Hello!
I have noticed lots of 'impossible keep-alive' messages in the log.
It appears that httpReplyBodySize incorrectly returns -1 for "304 Not
Modified" replies. Patch to fix it is attached.
--
Alexander.
Index: HttpReply.c
===================================================================
RCS file: /squid/squid/src/HttpReply.c,v
retrieving revision 1.68
diff -u -p -r1.68 HttpReply.c
--- HttpReply.c 15 Aug 2008 05:00:32 -0000 1.68
+++ HttpReply.c 3 Sep 2008 08:40:53 -0000
@@ -543,10 +543,9 @@ httpReplyBodySize(method_t * method, con
{
if (reply->sline.version.major < 1)
return -1;
- else if (method != NULL) {
- if (method->code == METHOD_HEAD)
- return 0;
- } else if (reply->sline.status == HTTP_OK)
+ if (method != NULL && method->code == METHOD_HEAD)
+ return 0;
+ else if (reply->sline.status == HTTP_OK)
(void) 0; /* common case, continue */
else if (reply->sline.status == HTTP_NO_CONTENT)
return 0;