X-Git-Url: http://git.wpitchoune.net/gitweb/?p=ppastats.git;a=blobdiff_plain;f=src%2Fhttp.c;h=7fda573991c6ca73bcdad179b6135d9383ced3be;hp=4baceef7f6454b3f888c3815f1fa55d52c6265c4;hb=c9ae4ae075de3815f814dbf48d2336cf536de42c;hpb=23b63657e6e51b811ff70824a69c594039cfbf66 diff --git a/src/http.c b/src/http.c index 4baceef..7fda573 100644 --- a/src/http.c +++ b/src/http.c @@ -91,7 +91,10 @@ static char *fetch_url(const char *url) curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cbk_curl); curl_easy_setopt(curl, CURLOPT_WRITEDATA, content); curl_easy_setopt(curl, CURLOPT_USERAGENT, "ppastats/0.0"); +#ifdef CURLOPT_TRANSFER_ENCODING + /* added since Curl 7.21.7 */ curl_easy_setopt(curl, CURLOPT_TRANSFER_ENCODING, 1); +#endif if (curl_easy_perform(curl) == CURLE_OK) { curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &code);