mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
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:
parent
41cb1488fc
commit
d6097cb64c
|
@ -140,6 +140,7 @@ int CRequest::RunImpl(CURL *pHandle)
|
||||||
curl_easy_setopt(pHandle, CURLOPT_URL, m_aUrl);
|
curl_easy_setopt(pHandle, CURLOPT_URL, m_aUrl);
|
||||||
curl_easy_setopt(pHandle, CURLOPT_NOSIGNAL, 1L);
|
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_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_WRITEDATA, this);
|
||||||
curl_easy_setopt(pHandle, CURLOPT_WRITEFUNCTION, WriteCallback);
|
curl_easy_setopt(pHandle, CURLOPT_WRITEFUNCTION, WriteCallback);
|
||||||
|
|
Loading…
Reference in a new issue