[PATCH] HTTP Compliance: add Warnings to stale hits

From: Alex Rousskov <rousskov_at_measurement-factory.com>
Date: Mon, 27 Sep 2010 13:06:39 -0600

HTTP Compliance: add appropriate Warnings if serving a stale hit.

Per RFC 2616, we MUST add "110 Response is stale" Warning if serving a
stale reply for any reason, including configured overrides. We MUST add
"111 Revalidation failed" Warning if serving a stale reply because an
attempt to revalidate the response failed, due to an inability to reach
the server.

The patch adds a new stale_if_hit request flag, which is set in
refreshCheckHTTP() when entry freshness is calculated.
refreshCheckHTTP() is now called in offline mode, to set stale_if_hit
properly. We check for the offline mode before returning from
refreshCheckHTTP() to preserve the original logic.

refreshCheckHTTP() is no longer called for internal requests, to avoid
setting of stale_if_hit flag. It did not do anything important for
internal requests anyway.

Co-Advisor test cases:
     test_case/rfc2616/noSrv-hit-stale-max-age-req
     test_case/rfc2616/ccReqDirMsg-max-stale-warning

Received on Mon Sep 27 2010 - 19:06:44 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 28 2010 - 12:00:13 MDT