]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
HTTP/1 message with no mime headers is valid
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 18 May 2014 14:01:48 +0000 (07:01 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 18 May 2014 14:01:48 +0000 (07:01 -0700)
src/HttpRequest.cc

index 1997b253196070113df776ffeff2f25b8003ee37..0d721a5187c81aecaaaa3c60221f7007ff62df04 100644 (file)
@@ -364,8 +364,10 @@ HttpRequest::parseFirstLine(const char *start, const char *end)
 bool
 HttpRequest::parseHeader(Http1::RequestParser &hp)
 {
+    // HTTP/1 message contains "zero or more header fields"
+    // zero does not need parsing
     if (!hp.headerBlockSize())
-        return false;
+        return true;
 
     bool result = header.parse(hp.rawHeaderBuf(), hp.headerBlockSize());