From: Jim Jagielski Date: Wed, 17 Sep 2008 14:21:39 +0000 (+0000) Subject: Merge r681190 from trunk: X-Git-Tag: 2.2.10~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a503b3d681ee8d3a13cb2886c4205cde5aabb52;p=thirdparty%2Fapache%2Fhttpd.git Merge r681190 from trunk: * Construct a site in the reverse proxy case when there is non. Submitted by: rpluem Reviewed by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@696315 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 96249eb6f29..331cfc94745 100644 --- a/STATUS +++ b/STATUS @@ -92,14 +92,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: http://svn.apache.org/viewvc?rev=639010&view=rev (mmn) +1: niq, rpluem, mturk - * mod_proxy_ftp: Build a correct Base HRef for directory listings in the - reverse proxy case. - Trunk version of patch: - http://svn.apache.org/viewvc?rev=681190&view=rev - Backport version for 2.2.x of patch: - Trunk version of patch works - +1: rpluem, jim, jerenkrantz - * mod_proxy: Add the possibility to set a separate connection timeout for backend workers. PR: 45445 diff --git a/modules/proxy/mod_proxy_ftp.c b/modules/proxy/mod_proxy_ftp.c index d9a3f51a494..45108361db5 100644 --- a/modules/proxy/mod_proxy_ftp.c +++ b/modules/proxy/mod_proxy_ftp.c @@ -318,6 +318,13 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f, /* Save "scheme://site" prefix without password */ site = apr_uri_unparse(p, &f->r->parsed_uri, APR_URI_UNP_OMITPASSWORD | APR_URI_UNP_OMITPATHINFO); + /* + * In the reverse proxy case we usually have no site. So contruct + * one. + */ + if ((*site == '\0') && (r->proxyreq == PROXYREQ_REVERSE)) { + site = ap_construct_url(p, "", r); + } /* ... and path without query args */ path = apr_uri_unparse(p, &f->r->parsed_uri, APR_URI_UNP_OMITSITEPART | APR_URI_UNP_OMITQUERY);