From: André Malo Date: Sun, 14 Dec 2003 16:21:44 +0000 (+0000) Subject: Let mod_autoindex show filenames containing special chars like %. X-Git-Tag: 2.0.49~287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be9cf6192ee68e4f60090eefab03254ea56d3e7a;p=thirdparty%2Fapache%2Fhttpd.git Let mod_autoindex show filenames containing special chars like %. PR: 13598 Reviewed by: Ian Holsman, Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@102057 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 09f9e7f2267..649c3cb700b 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.49 + *) mod_autoindex / core: Don't fail to show filenames containing + special characters like '%'. PR 13598. [André Malo] + *) mod_status: Report total CPU time accurately when using a threaded MPM. PR 23795. [Jeff Trawick] diff --git a/STATUS b/STATUS index fa2ac8abf72..c9c930f35a4 100644 --- a/STATUS +++ b/STATUS @@ -1,5 +1,5 @@ APACHE 2.0 STATUS: -*-text-*- -Last modified at [$Date: 2003/12/14 14:18:35 $] +Last modified at [$Date: 2003/12/14 16:21:43 $] Release: @@ -292,11 +292,6 @@ PATCHES TO BACKPORT FROM 2.1 nd replies: But if it can't be 0 the alternatives thereafter make no sense anymore, right? - * Let mod_autoindex show filenames containing special characters. - PR 13598. - server/request.c: r1.130 - +1: nd, ianh, trawick - * mod_setenvif: Fix optimizer to treat regexps as such even if they only contain anchors like \b. PR 24219. modules/metadata/mod_setenvif.c: r1.44 diff --git a/server/request.c b/server/request.c index 9b0704661cb..fb93bf4cd64 100644 --- a/server/request.c +++ b/server/request.c @@ -1694,10 +1694,13 @@ AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(const apr_finfo_t *dirent, rnew->uri = ap_make_full_path(rnew->pool, rnew->uri, r->path_info + 1); rnew->path_info = apr_pstrdup(rnew->pool, r->path_info); } + rnew->uri = ap_escape_uri(rnew->pool, rnew->uri); } else { udir = ap_make_dirstr_parent(rnew->pool, r->uri); - rnew->uri = ap_make_full_path(rnew->pool, udir, dirent->name); + rnew->uri = ap_escape_uri(rnew->pool, ap_make_full_path(rnew->pool, + udir, + dirent->name)); } fdir = ap_make_dirstr_parent(rnew->pool, r->filename);