httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1393199 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS modules/proxy/proxy_util.c
Date Tue, 02 Oct 2012 21:41:28 GMT
Author: minfrin
Date: Tue Oct  2 21:41:28 2012
New Revision: 1393199

URL: http://svn.apache.org/viewvc?rev=1393199&view=rev
Log:
mod_proxy: Avoid double slash with "ProxyPassReverse / ..." cases
trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1386576
             http://svn.apache.org/viewvc?view=revision&revision=1386578
2.4.x patch: trunk patch works
+1: jim, druggeri, minfrin

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1386576,1386578

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1393199&r1=1393198&r2=1393199&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Tue Oct  2 21:41:28 2012
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.4
 
+  *) mod_proxy: When concatting for PPR, avoid cases where we
+     concat ".../" and "/..." to create "...//..." [Jim Jagielski]
+
   *) mod_cache: Wrong content type and character set when
      mod_cache serves stale content because of a proxy error. 
      PR 53539.  [Rainer Jung, Ruediger Pluem]

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1393199&r1=1393198&r2=1393199&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Tue Oct  2 21:41:28 2012
@@ -89,12 +89,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
   
-   * mod_proxy: Avoid double slash with "ProxyPassReverse / ..." cases
-     trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1386576
-                  http://svn.apache.org/viewvc?view=revision&revision=1386578
-     2.4.x patch: trunk patch works
-     +1: jim, druggeri, minfrin
-
    
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Modified: httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c?rev=1393199&r1=1393198&r2=1393199&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/proxy_util.c Tue Oct  2 21:41:28 2012
@@ -894,7 +894,12 @@ PROXY_DECLARE(const char *) ap_proxy_loc
                     }
                 }
                 else if (l1 >= l2 && strncasecmp((*worker)->s->name, url,
l2) == 0) {
-                    u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
+                    /* edge case where fake is just "/"... avoid double slash */
+                    if ((ent[i].fake[0] == '/') && (ent[i].fake[1] == 0) &&
(url[l2] == '/')) {
+                        u = apr_pstrdup(r->pool, &url[l2]);
+                    } else {
+                        u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
+                    }
                     return ap_is_url(u) ? u : ap_construct_url(r->pool, u, r);
                 }
                 worker++;



Mime
View raw message