src/lib/cheapcgi.c 1.129
1.129 2010/01/13 22:05:53 angie
parseCookies: fixed bug that caused us to errAbort if cookie string ends with ';'.
Index: src/lib/cheapcgi.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/lib/cheapcgi.c,v
retrieving revision 1.128
retrieving revision 1.129
diff -b -B -U 4 -r1.128 -r1.129
--- src/lib/cheapcgi.c 4 Jan 2010 19:12:41 -0000 1.128
+++ src/lib/cheapcgi.c 13 Jan 2010 22:05:53 -0000 1.129
@@ -351,13 +351,14 @@
hash = newHash(6);
namePt = str;
-while (namePt != NULL)
+while (isNotEmpty(namePt))
{
dataPt = strchr(namePt, '=');
if (dataPt == NULL)
- errAbort("Mangled Cookie input string %s", namePt);
+ errAbort("Mangled Cookie input string '%s' (complete cookie string: '%s')",
+ namePt, getenv("HTTP_COOKIE"));
*dataPt++ = 0;
nextNamePt = strchr(dataPt, ';');
if (nextNamePt != NULL)
{
@@ -1663,9 +1664,9 @@
int argc = *pArgc;
int i;
int argcLeft = argc;
char *name;
-static char queryString[4096];
+static char queryString[16384];
char *q = queryString;
boolean needAnd = TRUE;
boolean gotAny = FALSE;
boolean startDash;