From: wessels <> Date: Tue, 18 Aug 1998 01:31:39 +0000 (+0000) Subject: make headersEnd() tolerant of repeated CR, eg X-Git-Tag: SQUID_3_0_PRE1~2883 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6123e0710f538db806402c56fd44f429ccd3295e;p=thirdparty%2Fsquid.git make headersEnd() tolerant of repeated CR, eg foo\r\r\n \r\r\n --- diff --git a/src/mime.cc b/src/mime.cc index 9894b360bd..afed6706f9 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -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;