]> granicus.if.org Git - apache/commitdiff
* Construct a site in the reverse proxy case when there is non.
authorRuediger Pluem <rpluem@apache.org>
Wed, 30 Jul 2008 20:15:41 +0000 (20:15 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 30 Jul 2008 20:15:41 +0000 (20:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@681190 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_ftp.c

index a23ccdf476c1dbc51a34b914d1779af766226470..e2350f4768596a8f018c8f8de5b09af54e162ce6 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);