diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-04-14 22:59:34 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-04-18 19:46:21 +0200 |
commit | 5aae3c13e2ce95c1e06e8512948f5caac118aa1c (patch) | |
tree | 39e7cd83caa099dbae84fa6208c6c8b4aa90142a /lib/README.encoding | |
parent | 8e4fb01e64bee1893452f25873758cb856898d84 (diff) |
transfer-encoding: document the options
The new libcurl and command line options are now described.
Diffstat (limited to 'lib/README.encoding')
-rw-r--r-- | lib/README.encoding | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/README.encoding b/lib/README.encoding index 0d31b3652..1012bb9ec 100644 --- a/lib/README.encoding +++ b/lib/README.encoding @@ -33,21 +33,21 @@ Gallagher, and support for the 'gzip' encoding was added by Dan Fandrich. To cause libcurl to request a content encoding use: - curl_easy_setopt(curl, CURLOPT_ENCODING, <string>) + curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, <string>) where <string> is the intended value of the Accept-Encoding header. Currently, libcurl only understands how to process responses that use the -"deflate" or "gzip" Content-Encoding, so the only values for CURLOPT_ENCODING -that will work (besides "identity," which does nothing) are "deflate" and -"gzip" If a response is encoded using the "compress" or methods, libcurl will -return an error indicating that the response could not be decoded. If -<string> is NULL no Accept-Encoding header is generated. If <string> is a -zero-length string, then an Accept-Encoding header containing all supported -encodings will be generated. - -The CURLOPT_ENCODING must be set to any non-NULL value for content to be -automatically decoded. If it is not set and the server still sends encoded +"deflate" or "gzip" Content-Encoding, so the only values for +CURLOPT_ACCEPT_ENCODING that will work (besides "identity," which does +nothing) are "deflate" and "gzip" If a response is encoded using the +"compress" or methods, libcurl will return an error indicating that the +response could not be decoded. If <string> is NULL no Accept-Encoding header +is generated. If <string> is a zero-length string, then an Accept-Encoding +header containing all supported encodings will be generated. + +The CURLOPT_ACCEPT_ENCODING must be set to any non-NULL value for content to +be automatically decoded. If it is not set and the server still sends encoded content (despite not having been asked), the data is returned in its raw form and the Content-Encoding type is not checked. |