mirror of
https://github.com/curl/curl.git
synced 2026-07-24 19:27:23 +03:00
content_encoding: fix limit failure message
The message triggered earlier than intended and did not take the transfer/content type into account. Ref #21603 Reported-by: Joshua Rogers Closes #21756
This commit is contained in:
parent
a8e6f90a69
commit
049ec8a363
3 changed files with 6 additions and 5 deletions
|
|
@ -750,9 +750,10 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
|
|||
return CURLE_OK;
|
||||
}
|
||||
|
||||
if(Curl_cwriter_count(data, phase) + 1 >= MAX_ENCODE_STACK) {
|
||||
failf(data, "Reject response due to more than %d content encodings",
|
||||
MAX_ENCODE_STACK);
|
||||
if(Curl_cwriter_count(data, phase) >= MAX_ENCODE_STACK) {
|
||||
failf(data, "Reject response exceeding limit of %d %s encodings",
|
||||
MAX_ENCODE_STACK,
|
||||
is_transfer ? "transfer" : "content");
|
||||
return CURLE_BAD_CONTENT_ENCODING;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue