]> 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:39:45 +0000 (20:39 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 1 Aug 2009 08:39:45 +0000 (20:39 +1200)
Bug 2728: regression: assertion failed: http.cc:705: "!eof"

Catch the zero size reply edge case again.

src/HttpMsg.cc

index 357e0ffb116d43e4cc5a90edaa967da92ac234c9..fb2d524cab80611cc67c9adb49020487e40aa935 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;
     }