]> git.ipfire.org Git - thirdparty/squid.git/commit - src/client_side_reply.cc
Propagate pinned connection persistency and closures to the client.
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 24 Jan 2013 10:26:24 +0000 (12:26 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 24 Jan 2013 10:26:24 +0000 (12:26 +0200)
commit693cb033a901175730c41cbba5000b7c66ad5e77
treea42cdab8adc24d1a9f59dd5422c3e14b1ff42c76
parentf318b8e9aee59425be709bb20ec4da079ccc97fd
Propagate pinned connection persistency and closures to the client.

Squid was trying hard to forward a request after pinned connection failures
because some of those failures were benign pconn races. That meant re-pinning
failed connections. After a few iterations to correctly handle non-idempotent
requests, the code appeared to work, but the final design, with all the added
complexity and related dangers was deemed inferior to the approach we use now.

Squid now simply propagates connection closures (including pconn races) to the
client. It is now the client responsibility not to send non-idempotent requests
on idle persistent connections and to recover from pconn races.

Squid also propagates HTTP connection persistency indicators from client to
server and back, to make client job feasible. Squid will send Connection:close
and will close the client connection if the pinned server says so, even if
Squid could still maintain a persistent connection with the client.

These changes are not mean to affect regular (not pinned) transactions.

In access.log, one can detect requests that were not responded to (due to race
conditions on pinned connections) by searching for ERR_ZERO_SIZE_OBJECT
%err_code with TCP_MISS/000 status and zero response bytes.

This is a Measurement Factory project.
src/RequestFlags.h
src/client_side.cc
src/client_side.h
src/client_side_reply.cc
src/forward.cc
src/http.cc