From 1d76cb9bc6dbed4bf2e80329479cadae2808c343 Mon Sep 17 00:00:00 2001 From: Garri Djavadyan Date: Fri, 9 Dec 2016 17:42:34 +1300 Subject: [PATCH] Bug 3940 (partial): hostHeaderVerify failures MISS when they should be HIT 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index b7c236d1fe..3459f3030f 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -1666,7 +1666,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 { -- 2.47.3