httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r1152273 - in /httpd/httpd/trunk: CHANGES modules/proxy/proxy_util.c
Date Fri, 29 Jul 2011 15:40:20 GMT
Author: niq
Date: Fri Jul 29 15:40:19 2011
New Revision: 1152273

URL: http://svn.apache.org/viewvc?rev=1152273&view=rev
Log:
mod_proxy: enable absolute URLs to be rewritten with ProxyPassReverse,
e.g. to reverse proxy "Location: https://other-internal-server/login" with
ProxyPassReverse https://public-address/ https://other-internal-server/


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/proxy/proxy_util.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1152273&r1=1152272&r2=1152273&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Fri Jul 29 15:40:19 2011
@@ -2,6 +2,10 @@
 
 Changes with Apache 2.3.14
 
+  *) mod_proxy: enable absolute URLs to be rewritten with ProxyPassReverse,
+     e.g. to reverse proxy "Location: https://other-internal-server/login"
+     [Nick Kew]
+
   *) prefork, worker, event: Make sure crashes are logged to the error log if
      httpd has already detached from the console. [Stefan Fritsch]
 

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1152273&r1=1152272&r2=1152273&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri Jul 29 15:40:19 2011
@@ -1144,12 +1144,12 @@ PROXY_DECLARE(const char *) ap_proxy_loc
                             && strncmp(urlpart, url + l2, l3) == 0) {
                         u = apr_pstrcat(r->pool, ent[i].fake, &url[l2 + l3],
                                         NULL);
-                        return ap_construct_url(r->pool, u, r);
+                        return ap_is_url(u) ? u : ap_construct_url(r->pool, u, r);
                     }
                 }
                 else if (l1 >= l2 && strncasecmp((*worker)->s->name, url,
l2) == 0) {
                     u = apr_pstrcat(r->pool, ent[i].fake, &url[l2], NULL);
-                    return ap_construct_url(r->pool, u, r);
+                    return ap_is_url(u) ? u : ap_construct_url(r->pool, u, r);
                 }
                 worker++;
             }
@@ -1174,7 +1174,7 @@ PROXY_DECLARE(const char *) ap_proxy_loc
             }
             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);
+                return ap_is_url(u) ? u : ap_construct_url(r->pool, u, r);
             }
         }
     }



Mime
View raw message