[PATCH] HTTP Compliance: Reply with an error if required validation failed

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Mon, 20 Sep 2010 10:52:41 -0600

HTTP Compliance: Reply with an error if required validation failed

RFC 2616 says that proxy MUST not use stale entries that have s-maxage,
proxy-revalidate, or must-revalidate cache-directive.

Add new fail_on_validation_err request flag to store result from
refreshCheck(). It is needed to avoid refreshLimits() recalculation in
clientReplyContext::handleIMSReply().

Split LOG_TCP_REFRESH_FAIL into LOG_TCP_REFRESH_FAIL_OLD (stale reply
sent) and LOG_TCP_REFRESH_FAIL_ERR (error forwarded). Though both logged
as TCP_REFRESH_FAIL for backward-compatibility with external scripts, etc.

Co-Advisor test cases:
     test_case/rfc2616/noSrv-hit-must-reval-s-maxage-resp
     test_case/rfc2616/noSrv-hit-must-reval-proxy-revalidate-resp
     test_case/rfc2616/noSrv-hit-must-reval-must-revalidate-resp

-------------

Is it a good idea to log new LOG_TCP_REFRESH_FAIL_OLD (stale reply sent)
and LOG_TCP_REFRESH_FAIL_ERR (error forwarded) as
"LOG_TCP_REFRESH_FAIL"? There are probably a lot of scripts out there
that cannot easily handle new outcomes, but I do not know whether we
should be kept hostage to them as the two outcomes are rather different.
Will we have to use the old tag forever?

Thank you,

Alex.

Received on Mon Sep 20 2010 - 16:53:09 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 21 2010 - 12:00:06 MDT