]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1116: Squid fails to close TCP connection after malformed HTTP response
authorhno <>
Wed, 8 Dec 2004 07:16:36 +0000 (07:16 +0000)
committerhno <>
Wed, 8 Dec 2004 07:16:36 +0000 (07:16 +0000)
src/HttpReply.cc

index 7b0468574c539dc74b30bc603546e56822662965..136dfc936ac39a22861bd57e2584b06bf9e8b650 100644 (file)
@@ -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 */