mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:03:36 +03:00
content_encoding: do not reset stage counter for each header
Test 418 verifies Closes #10492
This commit is contained in:
parent
4858e7af1c
commit
119fb18719
5 changed files with 158 additions and 6 deletions
|
|
@ -1047,7 +1047,6 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
|
|||
const char *enclist, int is_transfer)
|
||||
{
|
||||
struct SingleRequest *k = &data->req;
|
||||
int counter = 0;
|
||||
unsigned int order = is_transfer? 2: 1;
|
||||
|
||||
do {
|
||||
|
|
@ -1084,9 +1083,9 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
|
|||
if(!encoding)
|
||||
encoding = &error_encoding; /* Defer error at stack use. */
|
||||
|
||||
if(++counter >= MAX_ENCODE_STACK) {
|
||||
failf(data, "Reject response due to %u content encodings",
|
||||
counter);
|
||||
if(k->writer_stack_depth++ >= MAX_ENCODE_STACK) {
|
||||
failf(data, "Reject response due to more than %u content encodings",
|
||||
MAX_ENCODE_STACK);
|
||||
return CURLE_BAD_CONTENT_ENCODING;
|
||||
}
|
||||
/* Stack the unencoding stage. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue