From 76ac62bbf8248066bf6d6e9e6e4729bfa0ea65bf Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 15 Jun 2009 15:16:39 +0000 Subject: [PATCH] * Applied mattev's patch to add CURLOPT_HTTP_CONTENT_DECODING and CURLOPT_ENCODING flags --- citadel/modules/openid/serv_openid_rp.c | 4 ++++ citadel/modules/rssclient/serv_rssclient.c | 2 ++ 2 files changed, 6 insertions(+) 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)) { -- 2.30.2