From 5d3418ee65409e845fc700df9ab066e04a16fe37 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 26 Dec 2016 15:22:00 +1300 Subject: [PATCH] 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. --- src/client_side_request.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } -- 2.47.2