]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove hierarchy_stoplist in favour of always_direct
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 2 Aug 2014 13:01:28 +0000 (06:01 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 2 Aug 2014 13:01:28 +0000 (06:01 -0700)
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
src/cf.data.pre
src/client_side_request.cc

index 8cae4ee27e8484d876462c2b30de8819d0f1ad04..acb6ec677530191f86cb56f96d21aaa0f91a9baf 100644 (file)
@@ -243,7 +243,6 @@ public:
     } Addrs;
     size_t tcpRcvBufsz;
     size_t udpMaxHitObjsz;
-    wordlist *hierarchy_stoplist;
     wordlist *mcast_group_list;
     wordlist *dns_nameservers;
     CachePeer *peers;
index dde3ac5ab5d3eba20044be1422775df3e3cbfa4e..526776f45c0f0c68734cad6514cfa4bf3fed94e3 100644 (file)
@@ -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.
index 9487435849834988642b6cbbe4f819f024b2017e..2e84f37864152e8557bee9c3718aa55bdde8eee6 100644 (file)
@@ -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;