]> git.ipfire.org Git - thirdparty/squid.git/commit
Do not reuse persistent connections for PUTs to avoid ERR_ZERO_SIZE_OBJECT.
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 10 Sep 2012 23:07:01 +0000 (17:07 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 10 Sep 2012 23:07:01 +0000 (17:07 -0600)
commitccbcff0e420da717376dbf285af482a2b55c231c
tree63ec7ea8761be9c98ec8721883a701aa051535a7
parent4a7eb77ede09ee73286cb12b0c789364a90087fb
Do not reuse persistent connections for PUTs to avoid ERR_ZERO_SIZE_OBJECT.

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 or [also tricky] code to send 100-continue expectation requiredto
delay body sending. 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 we apply the same logic to them as well.

This reopens Squid bug #3398, undoing trunk r11859 commit which attempted
to close that bug.
src/forward.cc