]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix r893871 as noted by rpluem, to remove risk of returning a
authorNick Kew <niq@apache.org>
Sat, 26 Dec 2009 10:30:52 +0000 (10:30 +0000)
committerNick Kew <niq@apache.org>
Sat, 26 Dec 2009 10:30:52 +0000 (10:30 +0000)
relative-ised URL, and fix erroneous CHANGES bug attribution.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@893955 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 4e35251412f8ab105cb2fc4e7fd263474cb04cd5..a5fba36efc920c6905d108e0a891d49a1246743a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -30,8 +30,8 @@ Changes with Apache 2.3.5
                     ScanHTMLTitles, ReadmeName, HeaderName
      PR 48416 [Dmitry Bakshaev <dab18 izhnet.ru>, Nick Kew]
 
-  *) Proxy: Fix ProxyPassReverse with relative URL.
-     PR 38864 [Nick Kew]
+  *) Proxy: Fix ProxyPassReverse with relative URL
+     Derived (slightly erroneously) from PR 38864 [Nick Kew]
 
 Changes with Apache 2.3.4
 
index d310d73686456c279d4f7f21dbe234e7592151de..72a951d5c9f04daf508031fa6e92dda412380fd8 100644 (file)
@@ -1116,19 +1116,25 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r,
             }
         }
         else {
+            const char *part = url;
             l2 = strlen(real);
             if (real[0] == '/') {
-                const char *part = strstr(url, "://");
+                part = strstr(url, "://");
                 if (part) {
-                    part = strstr(part+3, "/");
+                    part = strchr(part+3, '/');
                     if (part) {
-                        url = part;
-                        l1 = strlen(url);
+                        l1 = strlen(part);
                     }
+                    else {
+                        part = url;
+                    }
+                }
+                else {
+                    part = url;
                 }
             }
-            if (l1 >= l2 && strncasecmp(real, url, l2) == 0) {
-                u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
+            if (l1 >= l2 && strncasecmp(real, part, l2) == 0) {
+                u = apr_pstrcat(r->pool, ent[i].fake, &part[l2], NULL);
                 return ap_construct_url(r->pool, u, r);
             }
         }