mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08:00
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.
This commit is contained in:
parent
179927c12a
commit
db239c07af
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user