]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make headersEnd() tolerant of repeated CR, eg
authorwessels <>
Tue, 18 Aug 1998 01:31:39 +0000 (01:31 +0000)
committerwessels <>
Tue, 18 Aug 1998 01:31:39 +0000 (01:31 +0000)
foo\r\r\n
\r\r\n

src/mime.cc

index 9894b360bdc0efa93d9233adf2652406d8bcebe2..afed6706f9c0edeae98db5ebd6c98d2fd6fcdf34 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mime.cc,v 1.75 1998/08/17 19:23:49 wessels Exp $
+ * $Id: mime.cc,v 1.76 1998/08/17 19:31:39 wessels Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -134,7 +134,9 @@ headersEnd(const char *mime, size_t l)
                state = 0;
            break;
        case 2:
-           if ('\n' == mime[e])
+           if ('\r' == mime[e])        /* ignore repeated CR */
+               (void) 0;
+           else if ('\n' == mime[e])
                state = 3;
            else
                state = 0;