]> granicus.if.org Git - apache/commitdiff
* modules/proxy/proxy_util.c (ap_proxy_location_reverse_map): Fix
authorJoe Orton <jorton@apache.org>
Wed, 25 Jul 2012 07:28:26 +0000 (07:28 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 25 Jul 2012 07:28:26 +0000 (07:28 +0000)
  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
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index ba7bcb1c6a9e79ffc7917a213f6749041326b3ae..03f49f69fd90c78e900eb0f0b9430350ccbc483b 100644 (file)
--- 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]
 
index d28b5255b0a6b72bc76b84762e37d0085ec10ec6..a4fe6f258570eb8153bd73f4dc016481f834a551 100644 (file)
@@ -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;