]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Support lines with spaces in them in included acl files
authorhno <>
Fri, 15 Nov 2002 20:09:31 +0000 (20:09 +0000)
committerhno <>
Fri, 15 Nov 2002 20:09:31 +0000 (20:09 +0000)
src/cache_cf.cc

index 4b7524ea026b632144a693b2cc8b9c72e55c89ec..adc7efe4e2eebe0650e04b03e0c527c9ed2aa8e5 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.420 2002/10/17 02:11:23 hno Exp $
+ * $Id: cache_cf.cc,v 1.421 2002/11/15 13:09:31 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -2513,10 +2513,17 @@ strtokFile(void)
        fromFile = 0;
        goto strtok_again;
     } else {
+       char *t2, *t3;
        t = buf;
        /* skip leading and trailing white space */
        t += strspn(buf, w_space);
-       t[strcspn(t, w_space)] = '\0';
+       t2 = t + strcspn(t, w_space);
+       t3 = t2 + strspn(t2, w_space);
+       while (*t3 && *t3 != '#') {
+           t2 = t3 + strcspn(t3, w_space);
+           t3 = t2 + strspn(t2, w_space);
+       }
+       *t2 = '\0';
        /* skip comments */
        if (*t == '#')
            goto strtok_again;