From: André Malo Date: Sat, 1 Nov 2003 22:29:42 +0000 (+0000) Subject: Let mod_autoindex show filenames containing special chars like %. X-Git-Tag: pre_ajp_proxy~1085 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a7767b78206641f73f1fd04bcda882626d57b7e;p=apache Let mod_autoindex show filenames containing special chars like %. PR: 13598 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101659 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 6db46db4ba..c86bceb0eb 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev [Remove entries to the current 2.0 section below, when backported] + *) mod_autoindex / core: Don't fail to show filenames containing + special characters like '%'. PR 13598. [André Malo] + *) mod_info: HTML escape configuration information so it displays correctly. PR 24232. [Thom May] diff --git a/server/request.c b/server/request.c index a0489b3722..67dff74603 100644 --- a/server/request.c +++ b/server/request.c @@ -1697,10 +1697,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);