]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3940 (partial): hostHeaderVerify failures MISS when they should be HIT
authorGarri Djavadyan <garryd@comnet.uz>
Thu, 15 Dec 2016 09:36:34 +0000 (22:36 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 15 Dec 2016 09:36:34 +0000 (22:36 +1300)
This fixes the critical condition leading to the HIT. However not all
code is correctly setting flags.noCache and flags.cacheable (see bugzilla).
So there may be other fixes needed after this.

src/client_side_reply.cc

index 257638079a70593e34e8e637adf8e3e366f7b4f7..7a9b8f8fd3661c9a46fac364fb109b96dd395cfa 100644 (file)
@@ -1649,7 +1649,9 @@ clientReplyContext::identifyStoreObject()
 {
     HttpRequest *r = http->request;
 
-    if (r->flags.cachable || r->flags.internal) {
+    // client sent CC:no-cache or some other condition has been
+    // encountered which prevents delivering a public/cached object.
+    if (!r->flags.noCache || r->flags.internal) {
         lookingforstore = 5;
         StoreEntry::getPublicByRequest (this, r);
     } else {