X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fhttp.c;h=d6c79835d44ef750e9ee8e60be9930b5e579294b;hb=b59ec44bffce28192c6408fed838c4d593a17c82;hp=4baceef7f6454b3f888c3815f1fa55d52c6265c4;hpb=967d20c38c65689c96a0276e6f916b4f8e2617de;p=ppastats.git diff --git a/src/http.c b/src/http.c index 4baceef..d6c7983 100644 --- a/src/http.c +++ b/src/http.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2012 jeanfi@gmail.com + * Copyright (C) 2011-2014 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -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);