]> code.citadel.org Git - citadel.git/blobdiff - webcit/context_loop.c
I think this restores the previous REST-like behavior of the landing page
[citadel.git] / webcit / context_loop.c
index bcab1154cce277f7f441e5196b9c9b8624878bf4..dc74601e1b9ecdf4cb161275c7b046efc21ceb29 100644 (file)
@@ -334,10 +334,10 @@ int ReadHttpSubject(ParsedHttpHdrs *Hdr, StrBuf *Line, StrBuf *Buf)
                );
        }
        else {
-               Hdr->HR.DontNeedAuth = 1; /* Flat request? show him the login screen... */
-               StrBuf *NewLine = NewStrBufPlain(HKEY("GET /do_template?template=login"));
-               StrBufUrlescAppend(NewLine, Buf, NULL);
-               StrBufAppendBufPlain(NewLine, HKEY(" HTTP/1.0"), 0);
+               /* If this is a "flat" request for the root, display the configured landing page. */
+               Hdr->HR.DontNeedAuth = 1;
+               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);