David Wheeler wrote:
> On May 11, 2004, at 2:40 PM, Geoffrey Young wrote:
> 
>> if all you want is mod_dir's default behavior (before mod_perl would
>> override it) and if you're interested in alternative methods, you
>> could also
>> try some of these.
>>
>>   - use ClearModuleList/AddModule to place mod_dir before mod_perl in the
>> module list, which means loading mod_dir _after_ mod_perl in httpd.conf.
> 
> 
> If they're DSOs. 

ClearModuleList/AddModule are not DSO specific - they just shuffle around
the order of the internal module list, which is what apache dispatches
against at request time.  note that both of these are provide by core, while
LoadModule is provided by mod_so.

> Does that apply to Apache 1.3 as well as 2.0?

unfortunately not.  I'm working on the ability to shuffle module around like
that, but I can't get it to work on win32.

but directories are really something different.  in mp2 it looks like we'll
need to take the approach that mod_dir does in 2.0 - if you want your
PerlResponseHandler to be triggered for directories you'll specifically need
to set $r->handler('perl-script') in a fixup handler.

> 
>>   - use a fixup handler to override mod_perl settings.  for example:
>>
>>      use Apache::Constants qw(DECLINED DIR_MAGIC_TYPE):
>>      $r->set_handlers(PerlHandler => sub { return DECLINED })
>>        if $r->content_type = DIR_MAGIC_TYPE;
> 
> 
> What is DIR_MAGIC_TYPE?

the internal content type that Apache sets when it sees that the uri
resolves to a directory.  I think it's http/unix-directory or something, but
you can check httpd.h for that.

> 
>>   - remove DIR_MAGIC_TYPE from the handler_rec in mod_perl.c and
>> recompile
>>
>> some of these may not be suitable for something like Bricolage
>> support.  but
>> there are options short of rewriting mod_dir in perl.
> 
> 
> Here's all that my Apache::Dir does:
> 
> sub handler {
>     my $r = shift;
>     return DECLINED unless -d $r->filename && $r->uri !~ m{/$};

yeah, you can probably just check for DIR_MAGIC_TYPE here.

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to