[PATCH] Do not reuse persistent connections for PUTs

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Wed, 29 Aug 2012 12:42:33 -0600

Hello,

    I saw bogus ERR_ZERO_SIZE_OBJECT responses while testing Squid v3.1,
but the same problem ought to be present in v3.2 as well.

A compliant proxy may retry PUTs, but Squid lacks the [rather
complicated] code required to protect the PUT request body from being
nibbled during the first try, when pconn races are possible. Thus, Squid
cannot safely retry some PUTs today, and FwdState::checkRetriable() must
return false for all PUTs, to avoid bogus ERR_ZERO_SIZE_OBJECT errors
(especially for clients that did not reuse a pconn and, hence, may not
be ready to handle/retry an error response).

In theory, requests with safe or idempotent methods other than PUT might
have bodies so the patch applies the same logic to them as well.

Thank you,

Alex.

Received on Wed Aug 29 2012 - 18:42:52 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 30 2012 - 12:00:12 MDT