httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Andersson" <>
Subject Re: [users@httpd] mod_autoindex and filenames containing "%"
Date Wed, 29 Oct 2003 06:53:30 GMT
Leslie R. Lait wrote:
> I'm having problems using mod_autoindex to provide directory listings
> of collections of data files that follow a certain local file naming
> convention.

I have been able to fix this behaviour. See the bug report that Leif

I've been too busy to find time to figure out how to propose it to be fixed,
and sadly will continue to be so.

If you are in need of having mod_autoindex work the way you want, a quick
fix is to change a line in the source and recompile. I cannot make a patch
now, so locate this function:

// in server/request.c (around line 1664)
AP_DECLARE(request_rec *) ap_sub_req_lookup_dirent(...)
    if (r->path_info && *r->path_info) {
    else {
        udir = ap_make_dirstr_parent(rnew->pool, r->uri);
        rnew->uri = ap_make_full_path(rnew->pool, udir, dirent->name);

The last statement (rnew->uri ...) should be changed to:
        rnew->uri = ap_make_full_path(rnew->pool, udir,
            ap_escape_path_segment(rnew->pool, dirent->name));

This will escape the URI passed to ap_process_request_internal(), which then
will behave as expected.

Robert Andersson

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message