]> granicus.if.org Git - apache/commitdiff
mod_proxy_ftp: Fix base for directory listings.
authorNick Kew <niq@apache.org>
Sat, 12 Jan 2008 19:32:24 +0000 (19:32 +0000)
committerNick Kew <niq@apache.org>
Sat, 12 Jan 2008 19:32:24 +0000 (19:32 +0000)
PR 27834

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@611466 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_ftp.c

diff --git a/CHANGES b/CHANGES
index 90ccf0071dc743c26c2d859cb70d3992b04875c5..9fd056592562b70639a1884b69c7f266bff9af55 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,15 +2,15 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) mod_proxy_ftp: Fix base for directory listings.
+     PR 27834 [Nick Kew]
+
   *) mod_proxy_http: Return HTTP status codes instead of apr_status_t
      values for errors encountered while forwarding the request body
      PR 44165 [Eric Covener]
 
   *) mod_logio: Provide optional function to allow modules to adjust the 
      bytes_in count [Eric Covener]
-     
-  *) mod_rewrite: Don't canonicalise URLs with [P,NE]
-     PR 43319 [<rahul sun.com>]
 
   *) mod_ssl: Added server name indication support (RFC 4366).
      PR 34607. [Kaspar Brand <asfbugz velox.ch>]
index 01aa9c52aa1b50d1e406affac390601ba837e929..90906bc4565eb55a1a848ae380265106509b85c1 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));