From: Amos Jeffries Date: Sun, 18 May 2014 14:01:48 +0000 (-0700) Subject: HTTP/1 message with no mime headers is valid X-Git-Tag: merge-candidate-3-v1~506^2~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cf559a833f7d02c9debfb5f69981f85c8274fb94;p=thirdparty%2Fsquid.git HTTP/1 message with no mime headers is valid --- diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 1997b25319..0d721a5187 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -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());