From: hno <> Date: Wed, 8 Dec 2004 07:16:36 +0000 (+0000) Subject: Bug #1116: Squid fails to close TCP connection after malformed HTTP response X-Git-Tag: SQUID_3_0_PRE4~990 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bda350ed79e9da834d64a405dca06ef6e82d864;p=thirdparty%2Fsquid.git Bug #1116: Squid fails to close TCP connection after malformed HTTP response --- diff --git a/src/HttpReply.cc b/src/HttpReply.cc index 7b0468574c..136dfc936a 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpReply.cc,v 1.66 2004/08/30 05:12:31 robertc Exp $ + * $Id: HttpReply.cc,v 1.67 2004/12/08 00:16:36 hno Exp $ * * DEBUG: section 58 HTTP Reply (Response) * AUTHOR: Alex Rousskov @@ -578,7 +578,9 @@ httpReplyIsolateStart(const char **parse_start, const char **blk_start, const ch int httpReplyBodySize(method_t method, HttpReply const * reply) { - if (METHOD_HEAD == method) + if (reply->sline.version.major < 1) + return -1; + else if (METHOD_HEAD == method) return 0; else if (reply->sline.status == HTTP_OK) (void) 0; /* common case, continue */