Index: src/DefaultWebRequestCurl.cpp |
=================================================================== |
--- a/src/DefaultWebRequestCurl.cpp |
+++ b/src/DefaultWebRequestCurl.cpp |
@@ -133,16 +133,18 @@ AdblockPlus::ServerResponse AdblockPlus: |
if (curl) |
{ |
std::stringstream responseText; |
HeaderData headerData; |
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); |
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); |
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, ReceiveData); |
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &responseText); |
+ // Request compressed data. Using any supported aglorithm |
+ curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, ""); |
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, ReceiveHeader); |
curl_easy_setopt(curl, CURLOPT_HEADERDATA, &headerData); |
struct curl_slist* headerList = 0; |
for (HeaderList::const_iterator it = requestHeaders.begin(); |
it != requestHeaders.end(); ++it) |
{ |
headerList = curl_slist_append(headerList, (it->first + ": " + it->second).c_str()); |