]> granicus.if.org Git - apache/commitdiff
"fix" regression in r1773397.
authorEric Covener <covener@apache.org>
Mon, 30 Jan 2017 12:59:09 +0000 (12:59 +0000)
committerEric Covener <covener@apache.org>
Mon, 30 Jan 2017 12:59:09 +0000 (12:59 +0000)
committing for discussion purposes to trunk.  I have reopened PR60458 because
I am tempted to revert the entire thing, it was not really a release-to-release
regression because the reporter arbitrarily used a new 2.4 syntax and the semantics
were unclear.

It is useful to have global exceptions apply to per-location proxypass, but it totally
breaks the "fast" lookup part of it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780909 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.c

index 5eb74acde9fd6425582d8de51797d4f407a970ca..a1a6a0f22f87da9d91fab3afe1c7109dd7467ecc 100644 (file)
@@ -794,16 +794,23 @@ static int proxy_trans(request_rec *r)
     if (dconf->alias) {
         int rv = ap_proxy_trans_match(r, dconf->alias, dconf);
         if (OK == rv) { 
+            int matches = 0;
             /* Got a hit. Need to make sure it's not explicitly declined */
             if (conf->aliases->nelts) {
                 ent = (struct proxy_alias *) conf->aliases->elts;
                 for (i = 0; i < conf->aliases->nelts; i++) {
                     int rv = ap_proxy_trans_match(r, &ent[i], dconf);
+                    if (OK == rv) matches++;
                     if (DECLINED == rv) { 
                         return DECLINED;
                     }
                 }
             }
+
+            /* a non !-rule matches in server scope, restore */
+            if (matches > 0) {
+                ap_proxy_trans_match(r, dconf->alias, dconf);
+            }
             return OK; 
         }
         if (DONE != rv) {