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, ""); |
Felix Dahlke
2017/03/02 14:33:38
Won't it be possible to overwrite this by supplyin
hub
2017/03/02 15:36:00
It is my understanding that passing "" will set th
Felix Dahlke
2017/03/02 15:39:47
Fair enough.
|
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()); |