mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
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/ git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1152273 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user