From: Daniel Stenberg Date: Fri, 9 Jun 2023 08:03:28 +0000 (+0200) Subject: example/crawler: also set CURLOPT_AUTOREFERER X-Git-Tag: curl-8_2_0~125 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=578becba301fc6bf6192844413ec565efa994e3a;p=thirdparty%2Fcurl.git example/crawler: also set CURLOPT_AUTOREFERER Could make sense, and it was not used in any example before. Closes #11283 --- diff --git a/docs/examples/crawler.c b/docs/examples/crawler.c index 33312cace4..aadfe2fb06 100644 --- a/docs/examples/crawler.c +++ b/docs/examples/crawler.c @@ -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, "");