X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Fcontext_loop.c;h=e0c8072b0947471fffa405ed017f4ab19cf5eb8d;hp=3a20c7e82092a54a283457151b3d3862b188fe4f;hb=b8395fd95e322ccff54434781faa29fce6053baa;hpb=68afde528d31aac8b261f674165ed1df6f604bfd diff --git a/webcit/context_loop.c b/webcit/context_loop.c index 3a20c7e82..e0c8072b0 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -544,8 +544,16 @@ void context_loop(ParsedHttpHdrs *Hdr) if ((StrLength(Hdr->c_username) == 0) && (!Hdr->HR.DontNeedAuth)) { - OverrideRequest(Hdr, HKEY("GET /static/nocookies.html?force_close_session=yes HTTP/1.0")); - Hdr->HR.prohibit_caching = 1; + + if ((Hdr->HR.Handler != NULL) && + (XHTTP_COMMANDS & Hdr->HR.Handler->Flags) == XHTTP_COMMANDS) { + OverrideRequest(Hdr, HKEY("GET /401 HTTP/1.0")); + Hdr->HR.prohibit_caching = 1; + } + else { + OverrideRequest(Hdr, HKEY("GET /static/nocookies.html?force_close_session=yes HTTP/1.0")); + Hdr->HR.prohibit_caching = 1; + } } if (StrLength(Hdr->c_language) > 0) {