From: Garri Djavadyan Date: Wed, 7 Dec 2016 00:05:07 +0000 (+1300) Subject: Bug 3940 (partial): hostHeaderVerify failures MISS when they should be HIT X-Git-Tag: M-staged-PR71~349 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8acd68f8e64ab7f78d91874962085d32f0bb475;p=thirdparty%2Fsquid.git 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. --- 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 {