From: Alex Rousskov Date: Sat, 21 Jan 2012 01:16:48 +0000 (-0700) Subject: Do not add HTTP 110 and 111 Warnings to TCP_REFRESH_UNMODIFIED responses. X-Git-Tag: SQUID_3_1_19~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d7ab80e74f441b92171732af4058fc9d276795e;p=thirdparty%2Fsquid.git 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. --- diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index cb5d84b3e0..c7e3f81803 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -359,6 +359,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());