[PATCH] Better reporting of REQMOD failures during body processing

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Tue, 22 Mar 2011 13:02:03 -0600

Better reporting of REQMOD failures during body processing.

When REQMOD body processing fails, the server side needs to abort the
in-progress transaction with the origin server. Use a new custom error
detail and HTTP 500 (Internal Server Error) instead of 502 (Bad Gateway)
status code for this case.

The HTTP 500 (Internal Server Error) is more appropriate because most
deployments consider adaptation to be a "part of the proxy service"
rather than an "external gateway". And the custom error detail carries
more information than a potentially stale and often irrelevant errno global.

Earlier Squid versions (e.g., v3.0) were returning HTTP 500 (Internal
Server Error) error under similar conditions. Then, after some code
improvements, we started handing these errors better, but the new code
used ERR_READ_ERROR and the 502 (Bad Gateway) codes for the symmetry
with similar error handling code.

Unfortunately, preserving that symmetry was wrong in this case because
we are not dealing with a server-side reading error here. After an
upgrade to v3.2, some users noticed the increased number of 502 (Bad
Gateway) errors, which wrongly implied origin server problems rather
than ICAP server problems.

Thank you,

Alex.

Received on Tue Mar 22 2011 - 19:02:11 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 23 2011 - 12:00:04 MDT