diff --git a/indra/llcorehttp/_httpoprequest.cpp b/indra/llcorehttp/_httpoprequest.cpp index 6186e7a308b..7e906643e37 100644 --- a/indra/llcorehttp/_httpoprequest.cpp +++ b/indra/llcorehttp/_httpoprequest.cpp @@ -513,7 +513,12 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) check_curl_easy_setopt(mCurlHandle, CURLOPT_NOPROGRESS, 1); check_curl_easy_setopt(mCurlHandle, CURLOPT_URL, mReqURL.c_str()); check_curl_easy_setopt(mCurlHandle, CURLOPT_PRIVATE, getHandle()); - check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); + +#if LIBCURL_VERSION_MAJOR > 7 + check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, nullptr); +#else + check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); +#endif check_curl_easy_setopt(mCurlHandle, CURLOPT_AUTOREFERER, 1); check_curl_easy_setopt(mCurlHandle, CURLOPT_MAXREDIRS, HTTP_REDIRECTS_DEFAULT); @@ -603,7 +608,12 @@ HttpStatus HttpOpRequest::prepareRequest(HttpService * service) case HOR_POST: { check_curl_easy_setopt(mCurlHandle, CURLOPT_POST, 1); + +#if LIBCURL_VERSION_MAJOR > 7 + check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, nullptr); +#else check_curl_easy_setopt(mCurlHandle, CURLOPT_ENCODING, ""); +#endif long data_size(0); if (mReqBody) { diff --git a/indra/llcorehttp/httpcommon.cpp b/indra/llcorehttp/httpcommon.cpp index 315ff15ebbd..5dc71b6b36a 100644 --- a/indra/llcorehttp/httpcommon.cpp +++ b/indra/llcorehttp/httpcommon.cpp @@ -289,7 +289,13 @@ 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 > 7 + result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_ENCODING, nullptr); +#else result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_ENCODING, ""); +#endif + check_curl_code(result, CURLOPT_ENCODING); result = curl_easy_setopt(curlpTemplateHandle, CURLOPT_AUTOREFERER, 1); check_curl_code(result, CURLOPT_AUTOREFERER);