summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Kaufmann <mail@michael-kaufmann.ch>2015-07-25 00:46:01 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-07-25 00:46:01 +0200
commitc5d060cab47037163fa803a598fedd9e989ca83b (patch)
treec9808861f8835d4bc12e7ce9e0858a05d32f477c /lib
parent98835eed29cd1f3451f0fb16ce1d4551a0e07df4 (diff)
downloadcurl-c5d060cab47037163fa803a598fedd9e989ca83b.tar.gz
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/http.c11
-rw-r--r--lib/http_chunks.c1
-rw-r--r--lib/transfer.c1
-rw-r--r--lib/urldata.h1
4 files changed, 0 insertions, 14 deletions
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]-
diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index 80c0f9548..7e91b37dc 100644
--- a/lib/http_chunks.c
+++ b/lib/http_chunks.c
@@ -218,7 +218,6 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
(ssize_t)piece);
break;
- case COMPRESS:
default:
failf (conn->data,
"Unrecognized content encoding type. "
diff --git a/lib/transfer.c b/lib/transfer.c
index 32e8702e6..718139b32 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -756,7 +756,6 @@ static CURLcode readwrite_data(struct SessionHandle *data,
result = Curl_unencode_gzip_write(conn, k, nread);
break;
- case COMPRESS:
default:
failf (data, "Unrecognized content encoding type. "
"libcurl understands `identity', `deflate' and `gzip' "
diff --git a/lib/urldata.h b/lib/urldata.h
index 06559229b..b1c2056c5 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -660,7 +660,6 @@ struct SingleRequest {
#define IDENTITY 0 /* No encoding */
#define DEFLATE 1 /* zlib deflate [RFC 1950 & 1951] */
#define GZIP 2 /* gzip algorithm [RFC 1952] */
-#define COMPRESS 3 /* Not handled, added for completeness */
#ifdef HAVE_LIBZ
zlibInitState zlib_init; /* possible zlib init state;