]> code.citadel.org Git - citadel.git/commitdiff
openid hacks
authorArt Cancro <ajc@citadel.org>
Sat, 24 May 2008 06:24:29 +0000 (06:24 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 24 May 2008 06:24:29 +0000 (06:24 +0000)
citadel/modules/openid/serv_openid_rp.c

index dde119cae3286c124f9118b0e05335770e74b3ab..302df544402e39e278797dbbff9cd97867989863 100644 (file)
@@ -174,6 +174,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_USERAGENT, CITADEL);
+       // FIXME set the CURLOPT_INTERFACE
        res = curl_easy_perform(curl);
        if (res) {
                CtdlLogPrintf(CTDL_DEBUG, "fetch_http() libcurl error %d: %s\n", res, errmsg);
@@ -370,8 +372,11 @@ void cmd_oidf(char *argbuf) {
        // curl_easy_setopt(curl, CURLOPT_WRITEDATA, &fh);
        // curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fh_callback);
        curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
+       curl_easy_setopt(curl, CURLOPT_POST, 1);
        curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg);
        curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
+       curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
+       // FIXME set the CURLOPT_INTERFACE
        res = curl_easy_perform(curl);
        if (res) {
                CtdlLogPrintf(CTDL_DEBUG, "cmd_oidf() libcurl error %d: %s\n", res, errmsg);