From: Yann Ylavic Date: Sat, 23 May 2015 08:34:44 +0000 (+0000) Subject: Merge r1665215, r1665218 from trunk. X-Git-Tag: 2.2.30~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c13bbb2bfc350a5810ed7a858502209c6268356a;p=thirdparty%2Fapache%2Fhttpd.git Merge r1665215, r1665218 from trunk. r1665215 | ylavic | 2015-03-09 13:45:56 +0100 (Mon, 09 Mar 2015) | 8 lines 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 r1665218 | ylavic | 2015-03-09 13:54:38 +0100 (Mon, 09 Mar 2015) | 1 line mod_proxy: follow up to r1665215: CHANGES entry. Reviewed by: ylavic, wrowe, rjung Backported by: ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1681289 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 7162a1a49ea..9ca970e3e0d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.30 + *) 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. [Hendrik Harms , William Rowe, Yann Ylavic] + *) mpm_winnt: Accept utf-8 (Unicode) service names and descriptions for internationalization. [William Rowe] diff --git a/STATUS b/STATUS index 8ed521b2d87..dc05311c133 100644 --- a/STATUS +++ b/STATUS @@ -101,14 +101,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * 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. - trunk patch: http://svn.apache.org/r1665215 - http://svn.apache.org/r1665218 (CHANGES entry) - 2.2.x patch: trunk works (modulo CHANGES) - +1: ylavic, wrowe, rjung - * mod_log_config: Allow to choose request start or end time as time stamp in log (httpd traditionally uses start, many other components, e.g. Tomcat use end time, so they are kind diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index b6a62c1069f..6426c39827b 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -2156,8 +2156,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 ? "#" : "",