[squid-dev] [PATCH] Older response must not update

Amos Jeffries squid3 at treenet.co.nz
Wed Aug 24 15:20:01 UTC 2016

On 25/08/2016 12:46 a.m., Eduard Bagdasaryan wrote:
> Hello,
> This patch teaches Squid to ignore a [revalidation] response with an older
> Date header.
> Before this patch, Squid violated the RFC 7234 section 4 MUST
> requirement: "When more than one suitable response is stored, a cache
> MUST use the most recent response (as determined by the Date header
> field)." This problem may be damaging in cache hierarchies where
> parent caches may have different responses. Trusting the older response
> may lead to excessive IMS requests, cache thrashing and other problems.


in src/HttpReply.cc:
* please use Squid syntax.
  -  return type on separate line above the method/function name.

in src/HttpReply.h:
* please use doxygen syntax "\returns" instead of "returns" in the
comment text.

in src/LogTags.cc:
* instead of adding new enum entry please extend LogTags with a new bool
flag and the c_str() to append the "IGNORED" when that flag is true.
 - TCP_REFRESH should be set when refresh was started.
 - whoever merges this patch will also need to update the wiki
SquidFaq/SquidLogs page to document what "IGNORED" means.

in src/client_side_reply.cc:
* please remove the "handleIMSReply: " bit from touched debugs messages.


More information about the squid-dev mailing list