summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/httpcommon.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-07-29 12:58:51 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-03 13:36:50 +0800
commitd6eb08d0740c30eed00bd600091d60128a6d079a (patch)
treefaf1428cf1066ad56fd41679c95a031d460266cb /indra/llcorehttp/httpcommon.cpp
parent9820b16404ba18a9a0103aa94c28ea452e0c99e6 (diff)
Anticipate curl 8 from not being able to download
This is cherry-picked from an old commit which was reverted before, but modified so that it only affects the platform that has to use system libcurl 8 (only Windows ARM64 so far). System libcurl, which is typically newer, doesn't accept when SL server responses with an invalid Content-Encoding value (usually some value that's probably meant to be put as the Content-Type value), that we'd get "unrecognized or bad HTTP Content or Transfer-Encoding" https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding A way to fix this would be to just not expect decompressed contents, by letting libcurl have the default value for CURLOPT_ACCEPT_ENCODING, which is NULL.
Diffstat (limited to 'indra/llcorehttp/httpcommon.cpp')
-rw-r--r--indra/llcorehttp/httpcommon.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp
index 315ff15ebb..2b09653d8e 100644
--- a/indra/llcorehttp/httpcommon.cpp
+++ b/indra/llcorehttp/httpcommon.cpp
@@ -289,8 +289,10 @@ CURL *getCurlTemplateHandle()
check_curl_code(result, CURLOPT_NOSIGNAL);
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_NOPROGRESS, 1);
check_curl_code(result, CURLOPT_NOPROGRESS);
+#if LIBCURL_VERSION_MAJOR < 8
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_ENCODING, "");
check_curl_code(result, CURLOPT_ENCODING);
+#endif
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_AUTOREFERER, 1);
check_curl_code(result, CURLOPT_AUTOREFERER);
result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_FOLLOWLOCATION, 1);