perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Moore <>
Subject Re: DIR_MERGE and .htaccess
Date Wed, 05 Jul 2000 15:15:05 GMT
On Wed, 5 Jul 2000, Matt Sergeant wrote:

> On Tue, 4 Jul 2000, Rick Myers wrote:
> > On Jul 04, 2000 at 14:40:26 +0100, Matt Sergeant twiddled the keys to say:
> > > Shouldn't DIR_MERGE be called when .htaccess files are found at different
> > > levels, e.g:
> > > 
> > > /axkit/.htaccess
> > > and
> > > /axkit/test/.htaccess
> > > 
> > > I ask for /axkit/test/test.xsp
> > > 
> > > I would have expected it to ask for both .htaccess files and try and merge
> > > the two using DIR_MERGE, but it doesn't. Am I missing something, or is
> > > this expected functionality?
> > 
> > I can't answer that question, but a while back I noticed that sometimes
> > PerlSetVar's weren't being seen by $r->dir_config as I'd expected.
> > Namely, within the "global" section of a <VirtualHost>. I wrote a little
> > module as an example, but never got around to voicing anything about it.
> > 
> > From what I saw then, DIR_MERGE nor SERVER_MERGE ever got called at all.
> > Maybe we're missing the same thing?
> Maybe. I think this is a core Apache problem. It seems that DIR_MERGE
> isn't called for two matching <Files> sections either, which is
> disappointing for me. I'd like to be able to go:
> <Files *.xsp>
> ...
> </Files>
> <Files example.xsp>
> ...
> </Files>
> And have both sections merged.

I'm using DIR_MERGE etc to make my own config directives and I was having
similar problems with it. I'm probably wrong but I think DIR_MERGE gets
called when merging directives in either <Location> or <Directory>
sections and not <Files>. Furthermore, any directives created above that
section, unless they themselves are in a <Location> or <Directory>
section are not merged. I dont know if this behaviour is expected or if I
just suck. Either way, I found that when I called DIR_MERGE on a top level
dir (whose parent is the server itself), it would get passed itself as
both parent and current dir objects. I had to use Apache::CmdParms to get
server config objects and merge them myself on server start.

This probably doesn't help much and neither will this. DIR_MERGE never
gets called at request time for me. Sample config:


  MyDirective On

  <Location /dir/>
    MyOtherDirective On		# dir merges with itself?!


DIR_MERGE does not do what I expected. Maybe I have to have this too:

  <Location /dir/subdir/>
    MyOtherDirective On

Then DIR_MERGE will get called to merge /dir/ and /dir/subdir/. Maybe. I
hope you can find something usefull in my ramblings.


Dave Moore
Web Application Developer

ePALS Classroom Exchange
The world's largest online classroom community -
Connecting over 27,000 classrooms in 130 countries!

View raw message