From 9967aef69ca96e30c487adb1473774e4a374269e Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 2 Aug 2014 06:01:28 -0700 Subject: [PATCH] Remove hierarchy_stoplist in favour of always_direct This directive was deprecated 2 years (and versions) ago. It can be replaced with: acl stoplist url_regex cgi-bin|\? always_direct allow stoplist The major difference between the two configurations is that the old hierarchy_stoplist was applied after never_direct and always_direct is applied before it. Both override the never_direct result, so this is not a problem. --- src/SquidConfig.h | 1 - src/cf.data.pre | 26 ++++++++------------------ src/client_side_request.cc | 7 ------- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/src/SquidConfig.h b/src/SquidConfig.h index 8cae4ee27e..acb6ec6775 100644 --- a/src/SquidConfig.h +++ b/src/SquidConfig.h @@ -243,7 +243,6 @@ public: } Addrs; size_t tcpRcvBufsz; size_t udpMaxHitObjsz; - wordlist *hierarchy_stoplist; wordlist *mcast_group_list; wordlist *dns_nameservers; CachePeer *peers; diff --git a/src/cf.data.pre b/src/cf.data.pre index dde3ac5ab5..526776f45c 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -169,6 +169,13 @@ DOC_START This option is not yet supported by Squid-3. DOC_END +# Options removed in 3.5 +NAME: hierarchy_stoplist +TYPE: obsolete +DOC_START + Remove this line. Use always_direct or cache_peer_access ACLs instead if you need to prevent cache_peer use. +DOC_END + # Options Removed in 3.3 NAME: ignore_ims_on_miss TYPE: obsolete @@ -3152,22 +3159,6 @@ DOC_START possible forwarding paths be tried multiple times. DOC_END -NAME: hierarchy_stoplist -TYPE: wordlist -DEFAULT: none -LOC: Config.hierarchy_stoplist -DOC_START - A list of words which, if found in a URL, cause the object to - be handled directly by this cache. In other words, use this - to not query neighbor caches for certain objects. You may - list this option multiple times. - - Example: - hierarchy_stoplist cgi-bin ? - - Note: never_direct overrides this option. -DOC_END - COMMENT_START MEMORY CACHE OPTIONS ----------------------------------------------------------------------------- @@ -7477,8 +7468,7 @@ LOC: Config.onoff.nonhierarchical_direct DEFAULT: on DOC_START By default, Squid will send any non-hierarchical requests - (matching hierarchy_stoplist or not cacheable request type) direct - to origin servers. + (not cacheable request type) direct to origin servers. When this is set to "off", Squid will prefer to send these requests to parents. diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 9487435849..2e84f37864 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -945,10 +945,8 @@ ClientRequestContext::clientStoreIdStart() static int clientHierarchical(ClientHttpRequest * http) { - const char *url = http->uri; HttpRequest *request = http->request; HttpRequestMethod method = request->method; - const wordlist *p = NULL; // intercepted requests MUST NOT (yet) be sent to peers unless verified if (!request->flags.hostVerified && (request->flags.intercepted || request->flags.interceptTproxy)) @@ -975,11 +973,6 @@ clientHierarchical(ClientHttpRequest * http) if (method != Http::METHOD_GET) return 0; - /* scan hierarchy_stoplist */ - for (p = Config.hierarchy_stoplist; p; p = p->next) - if (strstr(url, p->key)) - return 0; - if (request->flags.loopDetected) return 0; -- 2.39.5