]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r611466 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 26 Feb 2008 19:49:03 +0000 (19:49 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 26 Feb 2008 19:49:03 +0000 (19:49 +0000)
mod_proxy_ftp: Fix base for directory listings.
PR 27834

Submitted by: niq
Reviewed by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@631360 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/proxy/mod_proxy_ftp.c

diff --git a/CHANGES b/CHANGES
index 8b49522deee807f7527ac51aaec2badf731caa98..bfa2a9c6f936b31d82c3cb85716fad2c79e00c47 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.9
 
+  *) mod_proxy_ftp: Fix base for directory listings.
+     PR 27834 [Nick Kew]
+
   *) mod_logio: Provide optional function to allow modules to adjust the 
      bytes_in count [Eric Covener]
      
diff --git a/STATUS b/STATUS
index cedf0533a2ee0f6081423c671338ed7fe0919f6e..2880e6baae0644b6302e13f3d813b1c922d9e852 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -81,11 +81,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
- * mod_proxy_ftp: fixup base URL for directory listings.
-   PR 27834
-   http://svn.apache.org/viewvc?rev=611466&view=rev
-   +1: niq, rpluem, jim
-
  * Worker and Event MPMs: Fix race condition in pool recycling
    PR 44402
    http://svn.apache.org/viewvc?rev=630335&view=rev
index 3cacac6e65c5b03b3354137ac216d57a8289077b..7aa8ac09c2bc42291c8d112941335b78f5efd18a 100644 (file)
@@ -314,6 +314,7 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
         /* basedir is either "", or "/%2f" for the "squid %2f hack" */
         const char *basedir = "";  /* By default, path is relative to the $HOME dir */
         char *wildcard = NULL;
+        const char *escpath;
 
         /* Save "scheme://site" prefix without password */
         site = apr_uri_unparse(p, &f->r->parsed_uri, APR_URI_UNP_OMITPASSWORD | APR_URI_UNP_OMITPATHINFO);
@@ -350,13 +351,14 @@ static apr_status_t proxy_send_dir_filter(ap_filter_t *f,
         str = (basedir[0] != '\0') ? "<a href=\"/%2f/\">%2f</a>/" : "";
 
         /* print "ftp://host/" */
+        escpath = ap_escape_html(p, path);
         str = apr_psprintf(p, DOCTYPE_HTML_3_2
                 "<html>\n <head>\n  <title>%s%s%s</title>\n"
+                "<base href=\"%s%s%s\">\n"
                 " </head>\n"
                 " <body>\n  <h2>Directory of "
                 "<a href=\"/\">%s</a>/%s",
-                site, basedir, ap_escape_html(p, path),
-                site, str);
+                site, basedir, escpath, site, basedir, escpath, site, str);
 
         APR_BRIGADE_INSERT_TAIL(out, apr_bucket_pool_create(str, strlen(str),
                                                           p, c->bucket_alloc));