wcsession *WCC = WC;
StrBuf *Buf;
- lprintf(9, "SELECTED LANGUAGE: '%s'\n", bstr("language"));
-
if (havebstr("language")) {
set_selected_language(bstr("language"));
go_selected_language();
*/
if (!get_preference("startpage", &Buf)) {
Buf = NewStrBuf ();
- StrBufPrintf(Buf, "dotskip&room=_BASEROOM_");
+ StrBufPrintf(Buf, "dotskip?room=_BASEROOM_");
set_preference("startpage", Buf, 1);
}
if (ChrPtr(Buf)[0] == '/') {
StrBufCutLeft(Buf, 1);
}
- if (StrLength(Buf) == 0)
+ if (StrLength(Buf) == 0) {
StrBufAppendBufPlain(Buf, "dotgoto?room=_BASEROOM_", -1, 0);
+ }
+ lprintf(9, "Redirecting to user's start page: %s\n", ChrPtr(Buf));
http_redirect(ChrPtr(Buf));
}
StrBufCutLeft(hdr->HR.RawCookie, (pch - ChrPtr(hdr->HR.RawCookie)) + 7);
StrBufDecodeHex(hdr->HR.RawCookie);
- if (hdr->c_username == NULL)
- hdr->c_username = NewStrBufPlain(HKEY(DEFAULT_HTTPAUTH_USER));
- if (hdr->c_password == NULL)
- hdr->c_password = NewStrBufPlain(HKEY(DEFAULT_HTTPAUTH_PASS));
- if (hdr->c_roomname == NULL)
- hdr->c_roomname = NewStrBuf();
- if (hdr->c_language == NULL)
- hdr->c_language = NewStrBuf();
cookie_to_stuff(Line, &hdr->HR.desired_session,
hdr->c_username,
hdr->c_password,
hdr->HR.got_auth = AUTH_COOKIE;
}
+void
+HttpNewModule_AUTH
+(ParsedHttpHdrs *httpreq)
+{
+ httpreq->c_username = NewStrBufPlain(HKEY(DEFAULT_HTTPAUTH_USER));
+ httpreq->c_password = NewStrBufPlain(HKEY(DEFAULT_HTTPAUTH_PASS));
+ httpreq->c_roomname = NewStrBuf();
+ httpreq->c_language = NewStrBuf();
+}
+void
+HttpDetachModule_AUTH
+(ParsedHttpHdrs *httpreq)
+{
+ FLUSHStrBuf(httpreq->c_username);
+ FLUSHStrBuf(httpreq->c_password);
+ FLUSHStrBuf(httpreq->c_roomname);
+ FLUSHStrBuf(httpreq->c_language);
+}
+
void
HttpDestroyModule_AUTH
(ParsedHttpHdrs *httpreq)