mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:03:36 +03:00
http: Fix CURLOPT_HTTP200ALIASES
The httpcode < 100 check was also triggered when none of the fields were parsed, thus making the if(!nc) block unreachable. Closes #8171
This commit is contained in:
parent
ef4dc1b5be
commit
1b9f1f6055
1 changed files with 1 additions and 1 deletions
|
|
@ -4244,7 +4244,7 @@ CURLcode Curl_http_readwrite_headers(struct Curl_easy *data,
|
|||
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)) {
|
||||
else if(ISDIGIT(digit4) || (nc >= 4 && 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