diff --git a/CHANGES b/CHANGES index 7844bb79e9..371d18d057 100644 --- a/CHANGES +++ b/CHANGES @@ -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] diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index d78b5f6a91..25fd26c82a 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1144,12 +1144,12 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r, && 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_location_reverse_map(request_rec *r, } 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); } } }