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

Catch the zero size reply edge case again.

src/HttpMsg.cc

index d1b70db83a3863b80cd995dc4a8e558d769341a7..5d8160b8fa1a67f440c2d9c3c1a376bbf04a4e65 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;
     }