arrfab / rpms / httpd

Forked from rpms/httpd 5 years ago
Clone

Blame SOURCES/httpd-2.4.6-r1681289.patch

b19d6e
diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c
b19d6e
index a78224b..e672e4a 100644
b19d6e
--- a/modules/proxy/proxy_util.c
b19d6e
+++ b/modules/proxy/proxy_util.c
b19d6e
@@ -2260,8 +2260,12 @@ ap_proxy_determine_connection(apr_pool_t *p, request_rec *r,
b19d6e
      * The scheme handler decides if this is permanent or
b19d6e
      * short living pool.
b19d6e
      */
b19d6e
-    /* are we connecting directly, or via a proxy? */
b19d6e
-    if (!proxyname) {
b19d6e
+    /* Unless we are connecting the backend via a (forward Proxy)Remote, we
b19d6e
+     * have to use the original form of the URI (non absolute), but this is
b19d6e
+     * also the case via a remote proxy using the CONNECT method since the
b19d6e
+     * original request (and URI) is to be embedded in the body.
b19d6e
+     */
b19d6e
+    if (!proxyname || conn->is_ssl) {
b19d6e
         *url = apr_pstrcat(p, uri->path, uri->query ? "?" : "",
b19d6e
                            uri->query ? uri->query : "",
b19d6e
                            uri->fragment ? "#" : "",