From: Alex Rousskov Date: Tue, 25 Jun 2013 15:39:10 +0000 (-0600) Subject: Mark client streams that sent everything as STREAM_COMPLETE. X-Git-Tag: SQUID_3_5_0_1~444^2~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca6d5de2b6e3cfed79679f959d2cb31ac069063f;p=thirdparty%2Fsquid.git Mark client streams that sent everything as STREAM_COMPLETE. The old code used STREAM_UNPLANNED_COMPLETE if the completed stream was associated with a non-persistent connection, which did not make sense to me and, IIRC, led to store entry aborts even though the entries were not damaged in any way. This change may expose other subtle bugs, but none are known at this time. See also: http://www.squid-cache.org/mail-archive/squid-dev/200702/0017.html http://www.squid-cache.org/mail-archive/squid-dev/201102/0210.html --- diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 597a3a0733..8e4c4e1025 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1202,13 +1202,9 @@ clientReplyContext::replyStatus() return STREAM_UNPLANNED_COMPLETE; } - if (http->request->flags.proxyKeepalive) { - debugs(88, 5, "clientReplyStatus: stream complete and can keepalive"); - return STREAM_COMPLETE; - } - - debugs(88, 5, "clientReplyStatus: stream was not expected to complete!"); - return STREAM_UNPLANNED_COMPLETE; + debugs(88, 5, "clientReplyStatus: stream complete; keepalive=" << + http->request->flags.proxyKeepalive); + return STREAM_COMPLETE; } // XXX: Should this be checked earlier? We could return above w/o checking.