mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
headers: make sure the trailing newline is not stored
extended test1940 to verify blank header fields too Bug: https://curl.se/mail/lib-2024-01/0019.html Reported-by: Dmitry Karpov Closes #12675
This commit is contained in:
parent
77c3c1a8fb
commit
a9e128d569
4 changed files with 8 additions and 2 deletions
|
|
@ -295,7 +295,7 @@ CURLcode Curl_headers_push(struct Curl_easy *data, const char *header,
|
|||
if(!end)
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
}
|
||||
hlen = end - header + 1;
|
||||
hlen = end - header;
|
||||
|
||||
if((header[0] == ' ') || (header[0] == '\t')) {
|
||||
if(data->state.prevhead)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue