summaryrefslogtreecommitdiff
path: root/docs/examples
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2019-02-12 18:07:29 -0500
committerJay Satiro <raysatiro@yahoo.com>2019-02-12 18:07:29 -0500
commitdb239c07afd20a910b29cd061f179868d3b4b3c7 (patch)
tree10004226d6a3ccdf80d96e19ca94425edaefc6ec /docs/examples
parent179927c12a54ea810bbc7c6c6fb970ad90b89eef (diff)
downloadcurl-db239c07afd20a910b29cd061f179868d3b4b3c7.tar.gz
examples/crawler: Fix the Accept-Encoding setting
- Pass an empty string to CURLOPT_ACCEPT_ENCODING to use the default supported encodings. Prior to this change the specific encodings of gzip and deflate were set but there's no guarantee they'd be supported by the user's libcurl.
Diffstat (limited to 'docs/examples')
-rw-r--r--docs/examples/crawler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/examples/crawler.c b/docs/examples/crawler.c
index d8fa5a459..496d88c94 100644
--- a/docs/examples/crawler.c
+++ b/docs/examples/crawler.c
@@ -81,7 +81,7 @@ CURL *make_handle(char *url)
curl_easy_setopt(handle, CURLOPT_PRIVATE, mem);
/* For completeness */
- curl_easy_setopt(handle, CURLOPT_ENCODING, "gzip, deflate");
+ curl_easy_setopt(handle, CURLOPT_ACCEPT_ENCODING, "");
curl_easy_setopt(handle, CURLOPT_TIMEOUT, 5L);
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 10L);