From: Art Cancro Date: Sat, 11 Feb 2012 23:39:25 +0000 (-0500) Subject: I think this restores the previous REST-like behavior of the landing page X-Git-Tag: v8.11~193 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=095de21d2211d73d50677a2f3f2ee6da59ead5a2 I think this restores the previous REST-like behavior of the landing page --- diff --git a/webcit/context_loop.c b/webcit/context_loop.c index e9f940195..dc74601e1 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -336,7 +336,8 @@ int ReadHttpSubject(ParsedHttpHdrs *Hdr, StrBuf *Line, StrBuf *Buf) else { /* If this is a "flat" request for the root, display the configured landing page. */ Hdr->HR.DontNeedAuth = 1; - StrBuf *NewLine = NewStrBufPlain(HKEY("GET /landing HTTP/1.0")); + StrBuf *NewLine = NewStrBuf(); + StrBufAppendPrintf(NewLine, "GET /landing?go=%s HTTP/1.0", ChrPtr(Buf)); syslog(LOG_DEBUG, "Replacing with: %s", ChrPtr(NewLine)); int return_value = ReadHttpSubject(Hdr, NewLine, Buf); FreeStrBuf(&NewLine); diff --git a/webcit/webcit.c b/webcit/webcit.c index 94dda267c..bb36f9898 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -821,7 +821,13 @@ void display_default_landing_page(void) { if (WCC && WCC->serv_info && WCC->serv_info->serv_supports_guest) { /* default action */ - if (default_landing_page) { + if (havebstr("go")) { + syslog(9, "Explicit room selection: %s", bstr("go")); + StrBuf *teh_room = NewStrBufPlain(bstr("go"), strlen(bstr("go"))); + smart_goto(teh_room); + FreeStrBuf(&teh_room); + } + else if (default_landing_page) { http_redirect(default_landing_page); } else {