]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Lab10 <lab10@bt-anlagenbau.at>
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 1 Aug 2009 08:17:56 +0000 (20:17 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 1 Aug 2009 08:17:56 +0000 (20:17 +1200)
Bug 2728 regression: assertion failed: http.cc:705: "!eof"

Catch the zero size reply edge case again.

src/HttpMsg.cc

index 17d62742253461f77405869ea620e9a93d51366f..7525b070aaf8d849dace94eaf0161033c4027b56 100644 (file)
@@ -154,7 +154,11 @@ bool HttpMsg::parse(MemBuf *buf, bool eof, http_status *error)
 
     // sanity check the start line to see if this is in fact an HTTP message
     if (!sanityCheckStartLine(buf, hdr_len, error)) {
-        // NP: sanityCheck sets *error and sends debug warnings.
+        // NP: sanityCheck sets *error and sends debug warnings on syntax errors.
+        // if we have seen the connection close, this is an error too
+        if (eof && *error==HTTP_STATUS_NONE)
+            *error = HTTP_INVALID_HEADER;
+
         return false;
     }