Set CURLOPT_USERAGENT and CURLOPT_INTERFACE in the RSS reader
authorArt Cancro <ajc@citadel.org>
Tue, 27 May 2008 14:40:31 +0000 (14:40 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 27 May 2008 14:40:31 +0000 (14:40 +0000)
citadel/modules/openid/serv_openid_rp.c
citadel/modules/rssclient/serv_rssclient.c

index bb0734b4c4b02250e02cebd2e0d8043f4c8ac4a3..eaccbc6dd5d57b2b1db755e4315bdf1275bdf8b9 100644 (file)
@@ -409,10 +409,10 @@ void cmd_oidf(char *argbuf) {
 
        valbuf[fh.total_bytes_received] = 0;
        if (bmstrcasestr(valbuf, "is_valid:true")) {
-               CtdlLogPrintf(CTDL_DEBUG, "\e[32mVALIDATION SUCCEEDED!!  WOWOWOWWW!!\e[0m\n", valbuf);
+               CtdlLogPrintf(CTDL_DEBUG, "\e[32mAUTHENTICATION SUCCEEDED\e[0m\n", valbuf);
        }
        else {
-               CtdlLogPrintf(CTDL_DEBUG, "\e[31mVALIDATION FAILED.  DIACF.\e[0m\n", valbuf);
+               CtdlLogPrintf(CTDL_DEBUG, "\e[31mAUTHENTICATION FAILED\e[0m\n", valbuf);
        }
 
        /* FIXME do something with the results */
index c356e9d5478d18c2361d5e948715f86946de060e..851b9cbb4a616ef03eb3ee1305f1edd5f3df598c 100644 (file)
@@ -376,6 +376,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);
+       curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
+       if (!IsEmptyStr(config.c_ip_addr)) {
+               curl_easy_setopt(curl, CURLOPT_INTERFACE, config.c_ip_addr);
+       }
 
        memset(&ri, 0, sizeof(struct rss_item));
        ri.roomlist = rooms;