From: Christos Tsantilas Date: Tue, 27 Jan 2009 17:37:32 +0000 (+0200) Subject: Bug 2524: Connection close failed on Partial Content X-Git-Tag: SQUID_3_2_0_1~1237 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=65058d64548cbc3413b3f78d06d86c5577bea25e;p=thirdparty%2Fsquid.git Bug 2524: Connection close failed on Partial Content The method ClientSocketContext::socketState in the case of partial content request when all the expected bytes received and the proxy_keepalive flag is not set must return STREAM_UNPLANNED_COMPLETE to inform the caller that the socket should closed. --- diff --git a/src/client_side.cc b/src/client_side.cc index e50a8d8bac..2dd1a45e62 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1551,8 +1551,12 @@ ClientSocketContext::socketState() // did we get at least what we expected, based on range specs? - if (bytesSent == bytesExpected) // got everything - return STREAM_COMPLETE; + if (bytesSent == bytesExpected) { // got everything + if (http->request->flags.proxy_keepalive) + return STREAM_COMPLETE; + else + return STREAM_UNPLANNED_COMPLETE; + } // The logic below is not clear: If we got more than we // expected why would persistency matter? Should not this