From: Art Cancro Date: Mon, 15 Jun 2009 15:16:39 +0000 (+0000) Subject: * Applied mattev's patch to add CURLOPT_HTTP_CONTENT_DECODING and CURLOPT_ENCODING... X-Git-Tag: v7.86~1059 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=76ac62bbf8248066bf6d6e9e6e4729bfa0ea65bf;hp=82932fb6b663050ba7812555ddfb526a4fbe98b0;p=citadel.git * Applied mattev's patch to add CURLOPT_HTTP_CONTENT_DECODING and CURLOPT_ENCODING flags --- diff --git a/citadel/modules/openid/serv_openid_rp.c b/citadel/modules/openid/serv_openid_rp.c index 02c0eee40..2ca70f32a 100644 --- a/citadel/modules/openid/serv_openid_rp.c +++ b/citadel/modules/openid/serv_openid_rp.c @@ -540,6 +540,8 @@ int fetch_http(char *url, char *target_buf, int maxbytes, int normalize_len) curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fh_callback); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 1); + curl_easy_setopt(curl, CURLOPT_ENCODING, ""); curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL); curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180); /* die after 180 seconds */ if (!IsEmptyStr(config.c_ip_addr)) { @@ -756,6 +758,8 @@ void cmd_oidf(char *argbuf) { curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 1); + curl_easy_setopt(curl, CURLOPT_ENCODING, ""); curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL); curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180); /* die after 180 seconds */ if (!IsEmptyStr(config.c_ip_addr)) { diff --git a/citadel/modules/rssclient/serv_rssclient.c b/citadel/modules/rssclient/serv_rssclient.c index 7902ab743..13b26ba3b 100644 --- a/citadel/modules/rssclient/serv_rssclient.c +++ b/citadel/modules/rssclient/serv_rssclient.c @@ -399,6 +399,8 @@ void rss_do_fetching(char *url, char *rooms) { curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, rss_libcurl_callback); curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 1); + curl_easy_setopt(curl, CURLOPT_ENCODING, ""); curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL); curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180); /* die after 180 seconds */ if (!IsEmptyStr(config.c_ip_addr)) {