@@ -32,21 +32,31 @@ Pass a char * argument specifying what encoding you'd like.
32
32
33
33
Sets the contents of the Accept-Encoding: header sent in a HTTP request, and
34
34
enables decoding of a response when a Content-Encoding: header is received.
35
- Three encodings are supported: \fI identity \fP , which does nothing ,
35
+ Three encodings are supported: \fI identity \fP , meaning non-compressed ,
36
36
\fI deflate \fP which requests the server to compress its response using the
37
37
zlib algorithm, and \fI gzip \fP which requests the gzip algorithm.
38
38
39
39
If a zero-length string is set like "", then an Accept-Encoding: header
40
40
containing all built-in supported encodings is sent.
41
41
42
+ Set this option to NULL to explicitly disable it, which makes libcurl not send
43
+ an Accept-Encoding: header and not decompress contents automatically.
44
+
42
45
You can also opt to just include the Accept-Encoding: header in your request
43
46
with \fI CURLOPT_HTTPHEADER(3) \fP but then there will be no automatic
44
47
decompressing when receiving data.
45
48
46
49
This is a request, not an order; the server may or may not do it. This option
47
50
must be set (to any non-NULL value) or else any unsolicited encoding done by
48
- the server is ignored. See the special file lib/README.encoding for further
49
- details.
51
+ the server is ignored.
52
+
53
+ Servers might respond with Content-Encoding even without getting a
54
+ Accept-Encoding: in the request. Servers might respond with a different
55
+ Content-Encoding than what was asked for in the request.
56
+
57
+ The Content-Length: servers send for a compressed response is supposed to be
58
+ for the compressed content but sending the size for the non-compressed version
59
+ of the resource is a very common mistake.
50
60
.SH DEFAULT
51
61
NULL
52
62
.SH PROTOCOLS
0 commit comments