Skip to content

Commit 628711b

Browse files
committed
mod_proxy_fcgi: Use r->uri rather than r->filename for directory walk.
r->filename is a "proxy:" one for mod_proxy modules, and ap_directory_walk() can't cope with that, so force r->uri. Github: closes apache#468 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919547 13f79535-47bb-0310-9956-ffa450edef68
1 parent fc2f7c5 commit 628711b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/proxy/mod_proxy_fcgi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ static int proxy_fcgi_canon(request_rec *r, char *url)
133133
/* It has to be on disk for this to work */
134134
if (!strcasecmp(pathinfo_type, "full")) {
135135
rconf->need_dirwalk = 1;
136-
ap_unescape_url_keep2f(path, 0);
137136
}
138137
else if (!strcasecmp(pathinfo_type, "first-dot")) {
139138
char *split = ap_strchr(path, '.');
@@ -348,10 +347,11 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
348347
fcgi_req_config_t *rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module);
349348
fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config, &proxy_fcgi_module);
350349

351-
if (rconf) {
352-
if (rconf->need_dirwalk) {
353-
ap_directory_walk(r);
354-
}
350+
if (rconf && rconf->need_dirwalk) {
351+
char *saved_filename = r->filename;
352+
r->filename = r->uri;
353+
ap_directory_walk(r);
354+
r->filename = saved_filename;
355355
}
356356

357357
/* Strip proxy: prefixes */

0 commit comments

Comments
 (0)