char *deleteme = NULL;
long len;
void *Value;
- char *Key;
+ const char *Key;
keys = NewHash(1, NULL);
if (!keys) return;
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)) {
curl_easy_setopt(curl, CURLOPT_INTERFACE, config.c_ip_addr);
}
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)) {
curl_easy_setopt(curl, CURLOPT_INTERFACE, config.c_ip_addr);
}
if (CC->logged_in) {
if (attach_openid(&CC->user, oiddata->claimed_id) == 0) {
cprintf("attach\n");
+ CtdlLogPrintf(CTDL_DEBUG, "OpenID attach succeeded\n");
}
else {
cprintf("fail\n");
+ CtdlLogPrintf(CTDL_DEBUG, "OpenID attach failed\n");
}
}
if (login_via_openid(oiddata->claimed_id) == 0) {
cprintf("authenticate\n%s\n%s\n", CC->user.fullname, CC->user.password);
logged_in_response();
+ CtdlLogPrintf(CTDL_DEBUG, "Logged in using previously claimed OpenID\n");
}
/*
*/
else if (config.c_disable_newu) {
cprintf("fail\n");
+ CtdlLogPrintf(CTDL_DEBUG, "Creating user failed due to local policy\n");
}
/*
else if (openid_create_user_via_sreg(oiddata->claimed_id, keys) == 0) {
cprintf("authenticate\n%s\n%s\n", CC->user.fullname, CC->user.password);
logged_in_response();
+ CtdlLogPrintf(CTDL_DEBUG, "Successfully auto-created new user\n");
}
/*
else {
cprintf("\n");
}
+ CtdlLogPrintf(CTDL_DEBUG, "The desired Simple Registration name is already taken.\n");
}
}
}