diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-04-14 22:45:42 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-04-18 19:46:21 +0200 |
commit | 8e4fb01e64bee1893452f25873758cb856898d84 (patch) | |
tree | 8b94999d472b201d98f1d72144a10d8afc8c6675 /lib/url.c | |
parent | ebb37eac8ba8caca5282c41635e491f19fe7df48 (diff) | |
download | curl-8e4fb01e64bee1893452f25873758cb856898d84.tar.gz |
transfer-encoding: added new option and cmdline
Added CURLOPT_TRANSFER_ENCODING as the option to set to request Transfer
Encoding in HTTP requests (if built zlib enabled). I also renamed
CURLOPT_ENCODING to CURLOPT_ACCEPT_ENCODING (while keeping the old name
around) to reduce the confusion when we have to encoding options for
HTTP.
--tr-encoding is now the new command line option for curl to request
this, and thus I updated the test cases accordingly.
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1076,7 +1076,7 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, data->set.http_auto_referer = (bool)(0 != va_arg(param, long)); break; - case CURLOPT_ENCODING: + case CURLOPT_ACCEPT_ENCODING: /* * String to use at the value of Accept-Encoding header. * @@ -1092,6 +1092,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, (char *) ALL_CONTENT_ENCODINGS: argptr); break; + case CURLOPT_TRANSFER_ENCODING: + data->set.http_transfer_encoding = (bool)(0 != va_arg(param, long)); + break; + case CURLOPT_FOLLOWLOCATION: /* * Follow Location: header hints on a HTTP-server. |