]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #420: Fails to parse Connection: ,,,Header,,,
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 29 Mar 2008 06:14:27 +0000 (18:14 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 29 Mar 2008 06:14:27 +0000 (18:14 +1200)
Author: Henrik Nordstrom

and other list constructs with empty members

src/HttpHeaderTools.cc

index 9a79afb4315779e2a9417f83ad81836e3aadc50f..a9bd6d9cf307306008142b657da779d748e3e8da 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 */