]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Mark client streams that sent everything as STREAM_COMPLETE.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 25 Jun 2013 15:39:10 +0000 (09:39 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 25 Jun 2013 15:39:10 +0000 (09:39 -0600)
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

src/client_side_reply.cc

index 597a3a0733f8d19c8d2ddcea35464b2520840987..8e4c4e10257fb412457b9022d86e921e81a999b8 100644 (file)
@@ -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.