From: Eric Covener Date: Mon, 30 Jan 2017 12:59:09 +0000 (+0000) Subject: "fix" regression in r1773397. X-Git-Tag: 2.5.0-alpha~728 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db1c9beec962426f91e998fb1e1e8a8222b494ce;p=thirdparty%2Fapache%2Fhttpd.git "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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780909 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 5eb74acde9f..a1a6a0f22f8 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -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) {