mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
lib: fix two curlx_strtoofft invokes
- cf-h1-proxy: check return code and return error if the parser fails - http: make the Retry-After parser check for a date string first then number to avoid mis-parsing the begining of a date as a number Closes #16548
This commit is contained in:
parent
9213e4e497
commit
18c6d5512f
2 changed files with 17 additions and 10 deletions
|
|
@ -315,8 +315,11 @@ static CURLcode on_resp_header(struct Curl_cfilter *cf,
|
|||
k->httpcode);
|
||||
}
|
||||
else {
|
||||
(void)curlx_strtoofft(header + strlen("Content-Length:"),
|
||||
NULL, 10, &ts->cl);
|
||||
if(curlx_strtoofft(header + strlen("Content-Length:"),
|
||||
NULL, 10, &ts->cl)) {
|
||||
failf(data, "Unsupported Content-Length value");
|
||||
return CURLE_WEIRD_SERVER_REPLY;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(Curl_compareheader(header,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue