mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:13:34 +03:00
content_encoding: ignore duplicate chunked encoding
- ignore duplicate "chunked" transfer-encodings from a server to accomodate for broken implementations - add test1482 and test1483 Reported-by: Mel Zuser Fixes #13451 Closes #13461
This commit is contained in:
parent
9fc4b2c78c
commit
886899143f
4 changed files with 185 additions and 1 deletions
|
|
@ -1009,6 +1009,13 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
cwt = find_unencode_writer(name, namelen, phase);
|
||||
if(is_transfer && cwt && strncasecompare(name, "chunked", 7) &&
|
||||
Curl_cwriter_get_by_type(data, cwt)) {
|
||||
/* A 'chunked' transfer encoding has already been added.
|
||||
* Ignore duplicates. See #13451. */
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
if(!cwt)
|
||||
cwt = &error_writer; /* Defer error at use. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue