]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
example/crawler: also set CURLOPT_AUTOREFERER
authorDaniel Stenberg <daniel@haxx.se>
Fri, 9 Jun 2023 08:03:28 +0000 (10:03 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 9 Jun 2023 14:47:20 +0000 (16:47 +0200)
Could make sense, and it was not used in any example before.

Closes #11283

docs/examples/crawler.c

index 33312cace4893dd295e2516bc113f488ba25b6df..aadfe2fb0624dcd4a8eac858a5f22f863f768410 100644 (file)
@@ -95,6 +95,7 @@ CURL *make_handle(char *url)
   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_AUTOREFERER, 1L);
   curl_easy_setopt(handle, CURLOPT_MAXREDIRS, 10L);
   curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, 2L);
   curl_easy_setopt(handle, CURLOPT_COOKIEFILE, "");