httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@ast.cam.ac.uk (David Robinson)
Subject Re: httpd patches
Date Tue, 04 Apr 1995 14:21:00 GMT
>   Fortunately each ~user reference leaves corresponding alias in 'a' array
>   in http_alias.c and that's what I use to localize .htaccess search to
>   users' subtrees: for cycle in tackle_on_docroot goes through aliases
>   and locates corresponding real path.

>That's the bit I was missing... just spotted it in http_alias.c.  Thanks.

This (a ~user reference creating a new Alias) is a terrible hack that should
be done away with at the earliest opportunity. For a non-forking server it
means you would have to remember which aliases were created for a particular
request, and free them before handling the next request.

This hack exists to make possible an even worse hack: unmunge_name().
For error reporting back to the client, httpd tries to map the offending
filename back into a URL, rather than remembering the URL the user
actually requested. It does this by reverse mapping through the Alias lists;
hence the need to 'create' an alias for ~user -> /home/user/html.
This, of course, creates a bug; what if multiple Aliases point to the
same directory? The user can be told that they cannot access a URL which is
completely different to the one they requested...

 David.

Mime
View raw message