David Wheeler wrote:
> G'day.
>
> I recently had a need to have mod_dir in Apache 1.3 work even when I was
> using a Perl handler. It turns out that mod_dir does its thing during
> the response phase. So I created a quick Perl module to do what I want.
> Here's the description:
>
> This simple module is designed to be a partial replacement for the
> standard Apache mod_dir module. One of the things that module does is
> to redirect browsers to a directory URL ending in a slash when they
> request the directory without the slash. Since mod_dir seems do its
> thing during the Apache response phase, if you use a Perl handler, it
> won't run. This can be problematic if the Perl handler doesn't likewise
> take the directory redirecting into account.
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.
- 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;
- 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.
HTH
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]