httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1780909 - /httpd/httpd/trunk/modules/proxy/mod_proxy.c
Date Mon, 30 Jan 2017 12:59:09 GMT
Author: covener
Date: Mon Jan 30 12:59:09 2017
New Revision: 1780909

URL: http://svn.apache.org/viewvc?rev=1780909&view=rev
Log:
"fix" regression in r1773397.

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.


Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.c?rev=1780909&r1=1780908&r2=1780909&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.c Mon Jan 30 12:59:09 2017
@@ -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) {



Mime
View raw message