mirror of
https://github.com/curl/curl.git
synced 2026-08-24 22:43:38 +03:00
content_encoding: only do tranfer-encoding compression if asked to
To reduce surprises. Update test 387 and 418 accordingly. Closes #10899
This commit is contained in:
parent
3de6b6cfe5
commit
4033642930
4 changed files with 34 additions and 106 deletions
|
|
@ -53,6 +53,9 @@
|
|||
#include "content_encoding.h"
|
||||
#include "strdup.h"
|
||||
#include "strcase.h"
|
||||
|
||||
/* The last 3 #include files should be in this order */
|
||||
#include "curl_printf.h"
|
||||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
|
|
@ -1077,8 +1080,12 @@ CURLcode Curl_build_unencoding_stack(struct Curl_easy *data,
|
|||
Curl_httpchunk_init(data); /* init our chunky engine. */
|
||||
}
|
||||
else if(namelen) {
|
||||
const struct content_encoding *encoding = find_encoding(name, namelen);
|
||||
const struct content_encoding *encoding;
|
||||
struct contenc_writer *writer;
|
||||
if(is_transfer && !data->set.http_transfer_encoding)
|
||||
/* not requested, ignore */
|
||||
return CURLE_OK;
|
||||
encoding = find_encoding(name, namelen);
|
||||
|
||||
if(!k->writer_stack) {
|
||||
k->writer_stack = new_unencoding_writer(data, &client_encoding,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue