From: Yann Ylavic Date: Mon, 9 Mar 2015 12:45:56 +0000 (+0000) Subject: mod_proxy: use the original (non absolute) form of the request-line's URI X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1451bde4557dbed46991a7bdc30d95f3469685b;p=thirdparty%2Fapache%2Fhttpd.git mod_proxy: use the original (non absolute) form of the request-line's URI for requests embedded in CONNECT payloads used to connect SSL backends via a ProxyRemote forward-proxy. PR 55892. Submitted by: Hendrik Harms Reviewed by: wrowe, ylavic Committed by: ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665215 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 5f97f1e2b1f..f5bdc7878c7 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -2269,8 +2269,12 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r, * The scheme handler decides if this is permanent or * short living pool. */ - /* are we connecting directly, or via a proxy? */ - if (!proxyname) { + /* Unless we are connecting the backend via a (forward Proxy)Remote, we + * have to use the original form of the URI (non absolute), but this is + * also the case via a remote proxy using the CONNECT method since the + * original request (and URI) is to be embedded in the body. + */ + if (!proxyname || conn->is_ssl) { *url = apr_pstrcat(p, uri->path, uri->query ? "?" : "", uri->query ? uri->query : "", uri->fragment ? "#" : "",