DeleteHash(&((*sessions_to_kill)->ServCfg));
FreeStrBuf(&((*sessions_to_kill)->UrlFragment1));
FreeStrBuf(&((*sessions_to_kill)->UrlFragment2));
+ FreeStrBuf(&((*sessions_to_kill)->UrlFragment3));
FreeStrBuf(&((*sessions_to_kill)->WBuf));
FreeStrBuf(&((*sessions_to_kill)->HBuf));
FreeStrBuf(&((*sessions_to_kill)->CLineBuf));
(isspace(*ChrPtr(Line)))) {
pch = pchs = ChrPtr(Line);
pche = pchs + StrLength(Line);
- while (isspace(pch) && (pch < pche))
+ while (isspace(*pch) && (pch < pche))
pch ++;
StrBufCutLeft(Line, pch - pchs);
StrBufAppendBuf(LastLine, Line, 0);
}
/**
- * Browser-based sessions use cookies for session authentication
+ * Browser-based sessions use cookies for session
+
+authentication
*/
if (GetHash(HTTPHeaders, HKEY("COOKIE"), &vLine) &&
(vLine != NULL)) {
if (GetHash(HTTPHeaders, HKEY("AUTHORIZATION"), &vLine) &&
(vLine != NULL)) {
Line = (StrBuf*)vLine;
- if (strncasecmp(ChrPtr(Line), "Basic ", 6)) {
+ if (strncasecmp(ChrPtr(Line), "Basic", 5) == 0) {
StrBufCutLeft(Line, 6);
CtdlDecodeBase64(httpauth_string, ChrPtr(Line), StrLength(Line));
extract_token(httpauth_user, httpauth_string, 0, ':', sizeof httpauth_user);
extract_token(httpauth_pass, httpauth_string, 1, ':', sizeof httpauth_pass);
}
else
- lprintf(1, "Authentication sheme not supported! [%s]\n", ChrPtr(Line));
+ lprintf(1, "Authentication scheme not supported! [%s]\n", ChrPtr(Line));
}
if (GetHash(HTTPHeaders, HKEY("IF-MODIFIED-SINCE"), &vLine) &&
StrBufCutLeft(ReqLine, StrLength(ReqType) + 1);
StrBufCutRight(ReqLine, StrLength(HTTPVersion) + 1);
- if ((StrLength(ReqLine) >= 8) &&
+ if ((follow_xff == 1) && (StrLength(ReqLine) >= 8) &&
(ptr = strstr(ChrPtr(ReqLine), "/webcit/"), /*< Handle "/webcit/" */
(ptr != NULL))) {
StrBufCutLeft(ReqLine, 7);