mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
headers: set an error message on illegal response headers
Makes it report "Invalid response header" instead of the slightly odd "A libcurl function was given a bad argument". Add test 749 and 750 for more CONNECT response testing. Reported-by: Int64x86 on github Fixes #17330 Closes #17336
This commit is contained in:
parent
e270881a5d
commit
a8b947e7f4
4 changed files with 122 additions and 2 deletions
|
|
@ -336,8 +336,10 @@ CURLcode Curl_headers_push(struct Curl_easy *data, const char *header,
|
|||
Curl_llist_append(&data->state.httphdrs, hs, &hs->node);
|
||||
data->state.prevhead = hs;
|
||||
}
|
||||
else
|
||||
else {
|
||||
failf(data, "Invalid response header");
|
||||
free(hs);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue