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. Does that apply to Apache 1.3 as well as 2.0?


- 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?


- 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{/$};
    my $args = $r->args;
    $r->header_out(Location => $r->uri . '/' . ($args ? "?$args" : ''));
    return HTTP_MOVED_PERMANENTLY;
}

It's not everything that mod_dir does.

Regards,

David


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



Reply via email to