mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:43:32 +03:00
http: reject HTTP response codes < 100
... which then also includes negative ones as test 1430 uses. This makes native + hyper backend act identically on this and therefore test 1430 can now be enabled when building with hyper. Adjust test 1431 as well. Closes #7909
This commit is contained in:
parent
c40914dbdb
commit
c67a32fc56
4 changed files with 16 additions and 6 deletions
|
|
@ -4240,8 +4240,12 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
|
|||
|
||||
/* There can only be a 4th response code digit stored in 'digit4' if
|
||||
all the other fields were parsed and stored first, so nc is 5 when
|
||||
digit4 a digit */
|
||||
else if(ISDIGIT(digit4)) {
|
||||
digit4 a digit.
|
||||
|
||||
The sscanf() line above will also allow zero-prefixed and negative
|
||||
numbers, so we check for that too here.
|
||||
*/
|
||||
else if(ISDIGIT(digit4) || (k->httpcode < 100)) {
|
||||
failf(data, "Unsupported response code in HTTP response");
|
||||
return CURLE_UNSUPPORTED_PROTOCOL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue