Received: by taz.hyperreal.com (8.6.12/8.6.5) id RAA18359; Sun, 28 Jul 1996 17:14:55 -0700 Received: from acidik.organic.com by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id RAA18353; Sun, 28 Jul 1996 17:14:52 -0700 Received: from localhost (akosut@localhost) by acidik.organic.com (8.7.5/8.6.12) with SMTP id RAA10612 for ; Sun, 28 Jul 1996 17:14:27 -0700 (PDT) X-Authentication-Warning: acidik.organic.com: akosut owned process doing -bs Date: Sun, 28 Jul 1996 17:14:27 -0700 (PDT) From: Alexei Kosut To: new-httpd@hyperreal.com Subject: Re: URI->filename and mod_alias In-Reply-To: <199607282021.AA26573@en.muc.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com 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: Good. > 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. Thanks! -- Alexei Kosut The Apache HTTP Server http://www.nueva.pvt.k12.ca.us/~akosut/ http://www.apache.org/