* Older versions of libcurl may not have CURLOPT_HTTP_CONTENT_DECODING support. ...
authorArt Cancro <ajc@citadel.org>
Thu, 18 Jun 2009 02:52:38 +0000 (02:52 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 18 Jun 2009 02:52:38 +0000 (02:52 +0000)
citadel/modules/openid/serv_openid_rp.c
citadel/modules/rssclient/serv_rssclient.c

index 2ca70f32a777d1106e6da71914dab81f7a82ff2d..4c191e00b1b45d261d3dbc8634111faeb8dcbae0 100644 (file)
@@ -540,8 +540,10 @@ 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);
+#ifdef CURLOPT_HTTP_CONTENT_DECODING
        curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 1);
        curl_easy_setopt(curl, CURLOPT_ENCODING, "");
+#endif
        curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);           /* die after 180 seconds */
        if (!IsEmptyStr(config.c_ip_addr)) {
@@ -758,8 +760,10 @@ 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);
+#ifdef CURLOPT_HTTP_CONTENT_DECODING
        curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 1);
        curl_easy_setopt(curl, CURLOPT_ENCODING, "");
+#endif
        curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);           /* die after 180 seconds */
        if (!IsEmptyStr(config.c_ip_addr)) {
index 13b26ba3b495b511fb181437aee22c0a9b395e41..0fda7a4577c53ca362d36b3d3cc858212ad7f705 100644 (file)
@@ -399,8 +399,10 @@ 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);
+#ifdef CURLOPT_HTTP_CONTENT_DECODING
        curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 1);
        curl_easy_setopt(curl, CURLOPT_ENCODING, "");
+#endif
        curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);           /* die after 180 seconds */
        if (!IsEmptyStr(config.c_ip_addr)) {