]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy: use the original (non absolute) form of the request-line's URI
authorYann Ylavic <ylavic@apache.org>
Mon, 9 Mar 2015 12:45:56 +0000 (12:45 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 9 Mar 2015 12:45:56 +0000 (12:45 +0000)
for requests embedded in CONNECT payloads used to connect SSL backends via
a ProxyRemote forward-proxy. PR 55892.

Submitted by: Hendrik Harms <hendrik.harms gmail com>
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

modules/proxy/proxy_util.c

index 5f97f1e2b1f7a68c1cf24e67892986e7995ee483..f5bdc7878c71414244a60d97cd0ed3567576c42c 100644 (file)
@@ -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 ? "#" : "",