httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@engelschall.com (Ralf S. Engelschall)
Subject Broken API / per-dir config create (was: Re: mod_rewrite and per-dir context)
Date Sun, 13 Apr 1997 09:55:07 GMT

In article <Pine.LNX.3.95dg3.970412122337.19115B-100000@twinlark.arctic.org> you wrote:

> On Sat, 12 Apr 1997, Ben Laurie wrote:
> > I'd guess this is a consequence of the major rearrangement someone did
> > recently, I forget who, to the directory walking stuff. It is definitely not
> > supposed to be this way.

> I played with sub_req_lookup_file.  Ralf is this caused by something
> invoked through sub_req_lookup_file ?  If so it's likely a case of the
> optimization in there not copying the directory from the original request.
> Try adding that and see what happens...

No, I don't think sub_req_lookup_file is involved, because subrequests are
only done when the engine already has run and needs to inject the result into
the processing. Here a subrequest is used. 

The problem is not a subrequest, the problem is the per-dir walk to .htaccess
files and the fact that when a .htaccess file is found, the mod_rewrite
per-dir config create function gets called (ok up to this point), but always
with the second argument as NULL (not ok). The second argument to the per-dir
config create functions should be supply the directory name according to the
API.  Now it supplies always NULL, so the rewriting engine is configured with
too less information, so later it ignores the config when processing URLs.
Why?  Because it needs to know the name of the directory it acts on because it
has to strip it before and add it after matching the regexps.

Fact is: The API is broken at this point and got broken somewhere between
1.2b7 and 1.2b8. Just one obvious result is that mod_rewrite's per-dir rewrite
rules are _totally_ broken in 1.2b8. But there can be more modules which rely
on this API information. Hmmm.. we really have to fix the API here and need at
least a 1.2b9 I think. Shit happens. We should immediately find a patch for
this and put it in the patches-1.2b8.

BUT: Which patch fixes it? Hmmmm.... Today my mail-server went down in Munich
while I'm sitting here 30km away. I have to fix this hardware problem first
and as the second point I can try to figure the software problem out. But
I hope someone of the guys who know the core per-dir walking stuff better
than me can fix it.

Greetings,
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message