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.
// 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