LastLine = NULL;
do {
nLine ++;
- Line = NewStrBuf();
+ Line = NewStrBufPlain(NULL, SIZ / 4);
if (ClientGetLine(Hdr, Line) < 0) return 1;
TheSession = CreateSession(1, &SessionList, Hdr, &SessionListMutex);
if ((StrLength(Hdr->c_username) == 0) &&
- (!Hdr->HR.DontNeedAuth))
+ (!Hdr->HR.DontNeedAuth)) {
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) {
lprintf(9, "Session cookie requests language '%s'\n", ChrPtr(Hdr->c_language));
* Look for commonly-found probes of malware such as worms, viruses, trojans, and Microsoft Office.
* Short-circuit these requests so we don't have to send them through the full processing loop.
*/
- WebcitAddUrlHandler(HKEY("scripts"), do_404, ANONYMOUS|BOGUS); /* /root.exe /* Worms and trojans and viruses, oh my! */
- WebcitAddUrlHandler(HKEY("c"), do_404, ANONYMOUS|BOGUS); /* /winnt */
+ WebcitAddUrlHandler(HKEY("scripts"), do_404, ANONYMOUS|BOGUS); /* /root.exe - Worms and trojans and viruses, oh my! */
+ WebcitAddUrlHandler(HKEY("c"), do_404, ANONYMOUS|BOGUS); /* /winnt */
WebcitAddUrlHandler(HKEY("MSADC"), do_404, ANONYMOUS|BOGUS);
WebcitAddUrlHandler(HKEY("_vti"), do_404, ANONYMOUS|BOGUS); /* Broken Microsoft DAV implementation */
WebcitAddUrlHandler(HKEY("MSOffice"), do_404, ANONYMOUS|BOGUS); /* Stoopid MSOffice thinks everyone is IIS */
HttpNewModule_CONTEXT
(ParsedHttpHdrs *httpreq)
{
- httpreq->PlainArgs = NewStrBuf();
- httpreq->this_page = NewStrBuf();
+ httpreq->PlainArgs = NewStrBufPlain(NULL, SIZ);
+ httpreq->this_page = NewStrBufPlain(NULL, SIZ);
}
void