* fix /webcit/ URL reparsing
authorWilfried Göesgens <willi@citadel.org>
Mon, 15 Sep 2008 19:11:12 +0000 (19:11 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 15 Sep 2008 19:11:12 +0000 (19:11 +0000)
webcit/context_loop.c

index bdf17054d431ac211c56efd982221c36923a1d3f..932bb7c27b2110d553c864cb0a5bffc8ed13894e 100644 (file)
@@ -446,10 +446,10 @@ void context_loop(int *sock)
        StrBufCutLeft(ReqLine, StrLength(ReqType) + 1);
        StrBufCutRight(ReqLine, StrLength(HTTPVersion) + 1);
 
-       if ((StrLength(ReqLine) > 10) &&
-           (ptr = strstr(ChrPtr(ReqLine), "/webcit "), /*< Handle "/webcit" */
+       if ((StrLength(ReqLine) >= 7) &&
+           (ptr = strstr(ChrPtr(ReqLine), "/webcit"),  /*< Handle "/webcit" */
             (ptr != NULL))) {
-               StrBufCutLeft(ReqLine, 6);
+               StrBufCutLeft(ReqLine, 7);
        }
 
        /** Begin parsing the request. */