httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <>
Subject Re: URI->filename and mod_alias
Date Mon, 29 Jul 1996 00:14:27 GMT
On Sun, 28 Jul 1996, Ralf S. Engelschall wrote:

> Now I've changed mod_rewrite according to the requests from Alexei: It now
> _NEVER_ operates on or even changes r->uri. The new operation scheme is this:


> 	If r->filename is initially still NULL, it initializes it with the value
> 	of r->uri. Then it only operates only on r->filename in the following.

Hmm. I think it should ignore r->filename, whatever it is. It should only
act on r->uri and what it does internally. IMHO, of course. And
r->filename shouldn't exist in the first place, anyhow.

> BUT: While mod_rewrite now operates correctly, mod_alias still does not!

No, mod_alias operates correctly.

> The current mod_alias think it is the only user of the URI-to-filename hook
> and still operates on r->uri, which is incorrect, too. It should also use the
> operation scheme above, i.e. only use r->uri to initially set the first value
> of r->filename (if r->filename is still NULL) and then only operates on
> r->filename. 

No. It should do exactly what it does. Anything else will break thousands
of config files. Any uri-to-filename translator should do exactly that. If
it is able to translate r->uri to r->filename, it should do so and return
OK. If not, it should return DECLINED. Anything else will cause mass
confusion and hysteria.

mod_rewrite currently looks at the filename it translates, and tries to
figure out if it's a real file or not. It shouldn't do this, IMO. Not only
does it do a lot of stats (which can slow a server down, sometimes
drastically), it can also cause confusing behavior. If it finds a match,
it should return OK - it shouldn't check to see if the file exists, that's
the handler's job. Remember that a module later on down the line could
actually create those missing directories and files (a PUT handler, for
example), or may do something else entirely, like a database lookup or who
knows what. mod_rewrite should operate on blind faith that it did the
right thing. If it finds a match; any match; it should return OK,
otherwise DECLINED.


> This works out of the box with mod_rewrite_compat, but no longer with the

Then mod_rewrite_compat is broken, and is obviously not compatible.


-- Alexei Kosut <>            The Apache HTTP Server

View raw message