X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Flibcurl%2Fopts%2FCURLOPT_ACCEPT_ENCODING.html;h=f1faded28081cbaa310769ab6ebadae20d66eef1;hb=3e62527ed71a7a362d7ec321e7f026edab35f8e2;hp=dd9650a58a2ff0a3d17f7939d80ea0ebf843356a;hpb=0a710b32648c435f792f5993fdefa2d96f802580;p=platform%2Fupstream%2Fcurl.git diff --git a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.html b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.html index dd9650a..f1faded 100644 --- a/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.html +++ b/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.html @@ -55,10 +55,13 @@ p.roffit {

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);

DESCRIPTION

Pass a char * argument specifying what encoding you'd like. -

Sets the contents of the Accept-Encoding: header sent in a HTTP request, and enables decoding of a response when a Content-Encoding: header is received. Three encodings are supported: identity, which does nothing, deflate which requests the server to compress its response using the zlib algorithm, and gzip which requests the gzip algorithm. +

Sets the contents of the Accept-Encoding: header sent in a HTTP request, and enables decoding of a response when a Content-Encoding: header is received. Three encodings are supported: identity, meaning non-compressed, deflate which requests the server to compress its response using the zlib algorithm, and gzip which requests the gzip algorithm.

If a zero-length string is set like "", then an Accept-Encoding: header containing all built-in supported encodings is sent. +

Set this option to NULL to explicitly disable it, which makes libcurl not send an Accept-Encoding: header and not decompress contents automatically.

You can also opt to just include the Accept-Encoding: header in your request with CURLOPT_HTTPHEADER but then there will be no automatic decompressing when receiving data. -

This is a request, not an order; the server may or may not do it. This option must be set (to any non-NULL value) or else any unsolicited encoding done by the server is ignored. See the special file lib/README.encoding for further details.

DEFAULT

+

This is a request, not an order; the server may or may not do it. This option must be set (to any non-NULL value) or else any unsolicited encoding done by the server is ignored. +

Servers might respond with Content-Encoding even without getting a Accept-Encoding: in the request. Servers might respond with a different Content-Encoding than what was asked for in the request. +

The Content-Length: servers send for a compressed response is supposed to indicate the length of the compressed content so when auto decoding is enabled it may not match the sum of bytes reported by the write callbacks (although, sending the length of the non-compressed content is a common server mistake).

DEFAULT

NULL

PROTOCOLS

HTTP

EXAMPLE