William McKee wrote:
> On Tue, Apr 12, 2005 at 08:33:59PM -0400, Geoffrey Young wrote:
> 
>>for a good discussion, and a fixup handler that will likely fix your
>>problem.  you can also search the archives for the Apache::Dir discussion
>>that (IIRC) yielded that document.
> 
> 
> Geoff,
> 
> I tried using Apache::Dir. The current version on CPAN only supports
> mp1. Adding support for mp2 was easy enough but yielded no beneficial
> results (i.e., I still get 404 errors and the Apache log error).
> 
> I wrote to David W. who maintains the module; he had no further
> suggestions so I did some further debugging. It turns out that I'm not
> having a problem with appending a trailing slash; Apache seems to be
> doing this just fine with or without the Apache::Dir module.
> 
> The problem I'm having is that Apache is not setting the DirectoryIndex
> to a valid filename. It is instead complaining that it's trying to serve
> a directory. This is probably because ModPerl::Registry is handling the
> directory as turning off the SetHandler allows those indexes to be
> served (albeit I'm getting the script displayed as a text file instead
> of run as a perl script).

hmm.  I'm sorry I didn't get back to you today, but I had something
unexpected come up.  I'll be rolling rc5 tomorrow, but if you want to create
a bug tarball for me I'll look into it with whatever resources I can
scrounge up.

in the meanwhile here's my preliminary analysis...

SetHandler is forcing the handler to be mod_perl, but really mod_dir needs
to step in and handle the / -> DirectoryIndex conversion. so... what I would
do is alter that fixup handler to do something like this

  if ($r->handler('perl-script') && -d $r->filename && $r->is_initial_req) {
    $r->hander(Apache2::Const::DIR_MAGIC_TYPE);
  }

or somesuch.  basically, what you want to happen is for mod_dir to apply the
directory index and issue it's normal internal_direct to mod_perl.  un-doing
mod_mime's SetHandler for just the main request ought to do that.

however, I am on some severe pain killers at the moment, so who knows...

> 
> I also searched the archives for Apache::Dir as well as the Apache log
> error but could not find a discussion about this issue. Any more ideas
> for me?

http://marc.theaimsgroup.com/?t=108431004200002&r=1&w=2

--Geoff

Reply via email to