From db1c9beec962426f91e998fb1e1e8a8222b494ce Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Mon, 30 Jan 2017 12:59:09 +0000 Subject: [PATCH] "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 --- modules/proxy/mod_proxy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 5eb74acde9..a1a6a0f22f 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) { -- 2.50.1