From: Amos Jeffries Date: Mon, 26 Dec 2016 02:22:00 +0000 (+1300) Subject: Bug 3940 pt2: Make 'cache deny' do what is documented X-Git-Tag: SQUID_3_5_24~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d3418ee65409e845fc700df9ab066e04a16fe37;p=thirdparty%2Fsquid.git Bug 3940 pt2: Make 'cache deny' do what is documented Instead of overriding whatever cacheability was previously set to (including changing non-cacheables to be cacheable) actually prevent both cache read and write. --- diff --git a/src/client_side_request.cc b/src/client_side_request.cc index a2888a02b9..434d755e41 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -1407,7 +1407,10 @@ void ClientRequestContext::checkNoCacheDone(const allow_t &answer) { acl_checklist = NULL; - http->request->flags.cachable = (answer == ACCESS_ALLOWED); + if (answer == ACCESS_DENIED) { + http->request->flags.noCache = true; // dont read reply from cache + http->request->flags.cachable = false; // dont store reply into cache + } http->doCallouts(); }