From: Amos Jeffries Date: Thu, 22 Dec 2016 04:08:55 +0000 (+1300) Subject: Bug 3940 pt2: Make 'cache deny' do what is documented X-Git-Tag: M-staged-PR71~332 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58e1b950c27bfb0245134f5108ea507e9e90a40a;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 027634acbf..b24eeedd39 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -1399,7 +1399,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(); }