]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #420: Fails to parse Connection: ,,,Header,,,
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Fri, 28 Mar 2008 20:46:41 +0000 (21:46 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Fri, 28 Mar 2008 20:46:41 +0000 (21:46 +0100)
and other list constructs with empty members

src/HttpHeaderTools.cc

index 919767a229b46b81009f9e8636a4854551ebd1d4..17daefa6adc7da079bd09b75faa887cc4e4945d0 100644 (file)
@@ -269,6 +269,9 @@ strListGetItem(const String * str, char del, const char **item, int *ilen, const
     /* skip leading ws (ltrim) */
     *pos += xcountws(*pos);
 
+    /* skip leading delimiters */
+    *pos += strspn(*pos, delim[0]);
+
     *item = *pos;              /* remember item's start */
 
     /* find next delimiter */