From 63ec169cad756e78ead736d4ce3d4b87b78939ef Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Wed, 25 Jul 2012 07:28:26 +0000 Subject: [PATCH] * 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 --- CHANGES | 3 +++ modules/proxy/proxy_util.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index ba7bcb1c6a9..03f49f69fd9 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 d28b5255b0a..a4fe6f25857 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; -- 2.47.3