Re: DirectoryIndex ignored when using perl-handler

[prev] [thread] [next] [Date index for 2005/04/27]

From: Geoffrey Young
Subject: Re: DirectoryIndex ignored when using perl-handler
Date: 15:39 on 27 Apr 2005
for the sake of the archives, william reported that the below fixup handler
is "working like a champ" so I guess this is a workable solution for anyone
in the same situation.

and for anyone listening, rolling up a test tarball like william did was
outstanding - I was more than happy (ecstatic, actually) to spend the 10
minutes it took me to code the proper handler when all I needed to do was
run 'make test' and see _exactly_ what he saw as the problem and what he
expected to see when all was working properly.

so, thanks william :)

--Geoff


> the below code used as the only fixup
> handler should do the trick.
> 
> HTH
> 
> --Geoff
> 
> package My::Fixup;
> 
> use strict;
> use warnings FATAL => qw(all);
> 
> use Apache2::Const -compile => qw(DIR_MAGIC_TYPE OK DECLINED);
> use Apache2::RequestRec;
> 
> sub handler {
> 
>   my $r = shift;
> 
>   if ($r->handler eq 'perl-script' &&
>       -d $r->filename              &&
>       $r->is_initial_req)
>   {
>     $r->handler(Apache2::Const::DIR_MAGIC_TYPE);
> 
>     return Apache2::Const::OK;
>   }
> 
>   return Apache2::Const::DECLINED;
> }
> 
> 1;

(message missing)

DirectoryIndex ignored when using perl-handler
William McKee 00:06 on 13 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
Geoffrey Young 00:33 on 13 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
William McKee 13:54 on 13 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
William McKee 19:14 on 13 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
Geoffrey Young 00:21 on 14 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
William McKee 14:08 on 25 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
Geoffrey Young 17:51 on 25 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
Geoffrey Young 15:39 on 27 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
William McKee 20:35 on 25 Apr 2005

Re: DirectoryIndex ignored when using perl-handler
Thomas Hilbig 04:39 on 21 May 2005

Re: DirectoryIndex ignored when using perl-handler
Geoffrey Young 05:39 on 21 May 2005

Re: DirectoryIndex ignored when using perl-handler
Thomas Hilbig 16:07 on 22 May 2005

Re: DirectoryIndex ignored when using perl-handler
Geoffrey Young 14:43 on 23 May 2005

Re: DirectoryIndex ignored when using perl-handler
Thomas Hilbig 15:56 on 24 May 2005

Generated at 15:53 on 25 May 2005 by mariachi v0.52