* cut all left of webcit= from cookies
[citadel.git] / webcit / cookie_conversion.c
index 9bd90ca54be190929c95f1c88b6c1e778569d058..844798ea06bf94673561d6e1b7ca736e9e21ccf4 100644 (file)
@@ -86,8 +86,10 @@ void cookie_to_stuff(StrBuf *cookie, int *session,
        char buf[SIZ];
        int i, len;
 
-       if (strncmp(ChrPtr(cookie), "webcit=", (sizeof("webcit=") - 1)) == 0)
-               StrBufCutLeft(cookie, 7);
+       pch = strstr(ChrPtr(cookie), "webcit=");
+       
+       if (pch != NULL)
+               StrBufCutLeft(cookie, (pch - ChrPtr(cookie)) + 7);
 
        strcpy(buf, "");
        len = StrLength(cookie) / 2;