From: Garri Djavadyan Date: Thu, 15 Dec 2016 07:54:42 +0000 (+1300) Subject: Bug 2258 pt2: bypassing cache but not destroying cache entry X-Git-Tag: SQUID_4_0_17~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b19ab60542e4ef8648b6ba85c2b0fdd922d207c9;p=thirdparty%2Fsquid.git Bug 2258 pt2: bypassing cache but not destroying cache entry --- diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index efcdde59a5..732a1ad95f 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -543,8 +543,13 @@ HttpRequest::maybeCacheable() if (!method.respMaybeCacheable()) return false; - // XXX: this would seem the correct place to detect request cache-controls - // no-store, private and related which block cacheability + // RFC 7234 section 5.2.1.5: + // "cache MUST NOT store any part of either this request or any response to it" + // + // NP: refresh_pattern ignore-no-store only applies to response messages + // this test is handling request message CC header. + if (!flags.ignoreCc && cache_control && cache_control->noStore()) + return false; break; case AnyP::PROTO_GOPHER: