summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-31 01:45:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-31 01:46:35 +0300
commit8e182c09072b75d05c1dff89bd3337f08782a562 (patch)
tree704aaab3a2c261ed468755dabeb68cb0f8f0db74 /src/net/download.cpp
parenta0021f305d242ebc98a3507fd15011b1b51232d0 (diff)
downloadmanaverse-8e182c09072b75d05c1dff89bd3337f08782a562.tar.gz
manaverse-8e182c09072b75d05c1dff89bd3337f08782a562.tar.bz2
manaverse-8e182c09072b75d05c1dff89bd3337f08782a562.tar.xz
manaverse-8e182c09072b75d05c1dff89bd3337f08782a562.zip
Use all supported encoding while accesing http.
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r--src/net/download.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index 6d127d0a4..cf5a1d0b3 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -326,6 +326,7 @@ int Download::downloadThread(void *ptr)
curl_easy_setopt(d->mCurl, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(d->mCurl, CURLOPT_CONNECTTIMEOUT, 30);
curl_easy_setopt(d->mCurl, CURLOPT_TIMEOUT, 1800);
+ addHeaders(d->mCurl);
addProxy(d->mCurl);
secureCurl(d->mCurl);
}
@@ -536,6 +537,13 @@ void Download::secureCurl(CURL *const curl)
#endif
}
+void Download::addHeaders(CURL *const curl)
+{
+#if CURLVERSION_ATLEAST(7, 21, 7)
+ curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
+#endif
+}
+
void Download::prepareForm(curl_httppost **form, const std::string &fileName)
{
curl_httppost *lastPtr = nullptr;