From b52d0612a36147aeddc057667eda6a1d81b23bae Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Fri, 20 Jan 2012 16:28:14 -0700 Subject: [PATCH] Do not add HTTP 110 and 111 Warnings to TCP_REFRESH_UNMODIFIED responses. The old "stale if hit" logic did not account for cases where the stored stale response became fresh due to a successful revalidation with the origin server. When the stored response was stale at the time of the request, we were adding 110 "Response is stale" and even 111 "Revalidation failed" Warning headers to responses while logging TCP_REFRESH_UNMODIFIED, which is considered a hit. --- src/client_side_reply.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 9ee0a8167e..4bdedef23e 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -367,6 +367,7 @@ clientReplyContext::handleIMSReply(StoreIOBuffer result) // origin replied 304 if (status == HTTP_NOT_MODIFIED) { http->logType = LOG_TCP_REFRESH_UNMODIFIED; + http->request->flags.stale_if_hit = 0; // old_entry is no longer stale // update headers on existing entry old_rep->updateOnNotModified(http->storeEntry()->getReply()); -- 2.47.2