From: Joe Orton Date: Wed, 25 Jul 2012 07:28:26 +0000 (+0000) Subject: * modules/proxy/proxy_util.c (ap_proxy_location_reverse_map): Fix X-Git-Tag: 2.5.0-alpha~6586 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=769ea2b07455c838e72dcb8ce53ae1260d578285;p=apache * modules/proxy/proxy_util.c (ap_proxy_location_reverse_map): Fix to skip balancer:// prefix where applicable. Reviewed by: rjung, rpluem PR: 45434 (regressed since 2.2) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1365479 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index ba7bcb1c6a..03f49f69fd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_proxy: Fix ProxyPassReverse for balancer configurations. + PR 45434. [Joe Orton] + *) mod_proxy: Fix memory leak or possible corruption in ProxyBlock implementation. [Ruediger Pluem, Joe Orton] diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index d28b5255b0..a4fe6f2585 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -860,7 +860,7 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r, (balancer = ap_proxy_get_balancer(r->pool, sconf, real, 1))) { int n, l3 = 0; proxy_worker **worker = (proxy_worker **)balancer->workers->elts; - const char *urlpart = ap_strchr_c(real, '/'); + const char *urlpart = ap_strchr_c(real + sizeof(BALANCER_PREFIX) - 1, '/'); if (urlpart) { if (!urlpart[1]) urlpart = NULL;