]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3940 pt2: Make 'cache deny' do what is documented
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 26 Dec 2016 02:22:00 +0000 (15:22 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 26 Dec 2016 02:22:00 +0000 (15:22 +1300)
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

index a2888a02b91c614ca6f194b82da99cb183f0402b..434d755e41b714fbef8652f62aef4bdd52d3f88b 100644 (file)
@@ -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();
 }