ap_proxy_canon_netloc() called from canon_handler hooks modifies its given
url in pace, hence &r->filename[6] passed from ap_proxy_canon_url().
This is not an issue if every canon_handler hook succeeds (or declines)
since r->filename is usually completely rewritten finally, but on failure
it gets truncated.
Avoid this by passing a copy of r->filename from the start, the proxy *url
and r->filename don't need to point to the same data.
* proxy/proxy_util.c(ap_proxy_canon_url):
Pass a copy of r->filename to the canon_handler hooks.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1919023 13f79535-47bb-0310-9956-
ffa450edef68
}
/* Keep this after fixup_uds_filename() */
- url = &r->filename[6];
+ url = ap_pstrdup(r->pool, r->filename + 6);
if ((dconf->interpolate_env == 1) && (r->proxyreq == PROXYREQ_REVERSE)) {
/* create per-request copy of reverse proxy conf,