Automatically use HTTPS compression if the server supports it

Our typical HTTPS answer is reduced by 85% by this. Our JSON seems to
compress really well.
This commit is contained in:
heinrich5991 2021-03-07 22:41:34 +01:00
parent 41cb1488fc
commit d6097cb64c

View file

@ -140,6 +140,7 @@ int CRequest::RunImpl(CURL *pHandle)
curl_easy_setopt(pHandle, CURLOPT_URL, m_aUrl);
curl_easy_setopt(pHandle, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(pHandle, CURLOPT_USERAGENT, GAME_NAME " " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")");
curl_easy_setopt(pHandle, CURLOPT_ACCEPT_ENCODING, ""); // Use any compression algorithm supported by libcurl.
curl_easy_setopt(pHandle, CURLOPT_WRITEDATA, this);
curl_easy_setopt(pHandle, CURLOPT_WRITEFUNCTION, WriteCallback);