From: Amos Jeffries Date: Sat, 1 Aug 2009 08:17:56 +0000 (+1200) Subject: Author: Lab10 X-Git-Tag: SQUID_3_2_0_1~828 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=281832c6d6848e8b0e35fc8695ea4e2c34b68dbd;p=thirdparty%2Fsquid.git Author: Lab10 Bug 2728 regression: assertion failed: http.cc:705: "!eof" Catch the zero size reply edge case again. --- diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index 17d6274225..7525b070aa 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -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; }