]> git.ipfire.org Git - thirdparty/squid.git/commit - src/refresh.cc
HTTP Compliance: Reply with an error if required validation fails.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 28 Sep 2010 15:20:36 +0000 (09:20 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 28 Sep 2010 15:20:36 +0000 (09:20 -0600)
commit7948b78453428ba97afe31b86f3cf371456c9713
tree39288d15629991dafeb449f45d3c0973c9199a16
parent4802f60d1e013619b1d7d194dcf5d540bbe5042c
HTTP Compliance: Reply with an error if required validation fails.

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). However, both are still logged
as TCP_REFRESH_FAIL for backward-compatibility with external scripts and such.
We may decide to start logging more detailed codes later.

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
src/client_side_reply.cc
src/enums.h
src/http.cc
src/log/access_log.cc
src/refresh.cc
src/structs.h