]> granicus.if.org Git - apache/commitdiff
Merge r1365479 from trunk:
authorJoe Orton <jorton@apache.org>
Wed, 25 Jul 2012 14:37:16 +0000 (14:37 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 25 Jul 2012 14:37:16 +0000 (14:37 +0000)
* modules/proxy/proxy_util.c (ap_proxy_location_reverse_map): Fix
  to skip balancer:// prefix where applicable.

Reviewed by: jorton, jim, rjung
PR: 45434 (regressed since 2.2)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1365604 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 93878c538cb16ec2f01eeba309c338c5a78bd694..534958860af9c0f6921aba4e207e8f67a70d55bb 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@ Changes with Apache 2.4.3
      possible XSS for a site where untrusted users can upload files to
      a location with MultiViews enabled. [Niels Heinen <heinenn google.com>]
 
+  *) mod_proxy: Fix ProxyPassReverse for balancer configurations.
+     PR 45434.  [Joe Orton]
+
   *) mod_lua: Add the parsebody function for parsing POST data. PR 53064.
      [Daniel Gruno]
 
index fe2ac43e20a54490a69ef8c3e50099961fcaf462..494a4c3bedd0c2ea1b3a2d33c11692bf403c4b41 100644 (file)
@@ -852,7 +852,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;