Skip to content

Commit

Permalink
mod_proxy_fcgi: Use r->uri rather than r->filename for directory walk.
Browse files Browse the repository at this point in the history
r->filename is a "proxy:" one for mod_proxy modules, and ap_directory_walk()
can't cope with that, so force r->uri.
  • Loading branch information
ylavic committed Jul 27, 2024
1 parent 3ce4c8c commit ba1fa84
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/proxy/mod_proxy_fcgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,11 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r,
fcgi_req_config_t *rconf = ap_get_module_config(r->request_config, &proxy_fcgi_module);
fcgi_dirconf_t *dconf = ap_get_module_config(r->per_dir_config, &proxy_fcgi_module);

if (rconf) {
if (rconf->need_dirwalk) {
ap_directory_walk(r);
}
if (rconf && rconf->need_dirwalk) {
char *saved_filename = r->filename;
r->filename = r->uri;
ap_directory_walk(r);
r->filename = saved_filename;
}

/* Strip proxy: prefixes */
Expand Down

0 comments on commit ba1fa84

Please sign in to comment.