From c5d060cab47037163fa803a598fedd9e989ca83b Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sat, 25 Jul 2015 00:46:01 +0200 Subject: HTTP: ignore "Content-Encoding: compress" Currently, libcurl rejects responses with "Content-Encoding: compress" when CURLOPT_ACCEPT_ENCODING is set to "". I think that libcurl should treat the Content-Encoding "compress" the same as other Content-Encodings that it does not support, e.g. "bzip2". That means just ignoring it. --- lib/http.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'lib/http.c') diff --git a/lib/http.c b/lib/http.c index b9e804771..a1eef815b 100644 --- a/lib/http.c +++ b/lib/http.c @@ -3582,14 +3582,6 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data, k->auto_decoding = GZIP; start += 6; } - else if(checkprefix("compress", start)) { - k->auto_decoding = COMPRESS; - start += 8; - } - else if(checkprefix("x-compress", start)) { - k->auto_decoding = COMPRESS; - start += 10; - } else /* unknown! */ break; @@ -3622,9 +3614,6 @@ CURLcode Curl_http_readwrite_headers(struct SessionHandle *data, else if(checkprefix("gzip", start) || checkprefix("x-gzip", start)) k->auto_decoding = GZIP; - else if(checkprefix("compress", start) - || checkprefix("x-compress", start)) - k->auto_decoding = COMPRESS; } else if(checkprefix("Content-Range:", k->p)) { /* Content-Range: bytes [num]- -- cgit v1.2.1