]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r681190 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 17 Sep 2008 14:21:39 +0000 (14:21 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 17 Sep 2008 14:21:39 +0000 (14:21 +0000)
* 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

STATUS
modules/proxy/mod_proxy_ftp.c

diff --git a/STATUS b/STATUS
index 96249eb6f29adacfd3dccde33d44db05694c4f26..331cfc947450469e8cc398b8b7a6c64fb7327fac 100644 (file)
--- 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
index d9a3f51a494ec217e04d4b9b37f137d9aefa2fe6..45108361db59ab7c1f2a109cffdff7cbb2ee6a09 100644 (file)
@@ -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);