Re: DirectoryIndex ignored when using perl-handler

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

From: William McKee
Subject: Re: DirectoryIndex ignored when using perl-handler
Date: 14:08 on 25 Apr 2005
On Wed, Apr 13, 2005 at 08:21:46PM -0400, Geoffrey Young wrote:
> 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.

Hi Geoff,

I've finally found a chance to create the bug report tarball[1] for the
directory index problems I'm seeing. The important stuff is in
t/conf/extra.conf.in where the settings are causing the tests to fail.
Perhaps I'm doing something wrong in my settings, but as I've reported
before, these used to work under mp1.


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

I tried adding the above code to Apache::Dir (I fixed the $r->hander to
$r->handler) and found that I needed to include a 'use
Apache::RequestRec' statement (yes, I'm still on RC4 at the moment).

Now, the server is returning a 403 error with the following entry in the
error log when I try to retrieve the index.html:

 [Mon Apr 25 09:48:17 2005] [error] file permissions deny server
 execution /home/william/Apache-Test-skeleton-mp2/t/htdocs/index.html

This is followed by the usual error about not being able to serve the
directory when I try to GET '/' in t/01basic.t. It looks like the gist
is that the suggested patch didn't work or was incorrectly applied.


Thanks,
William

[1] http://66.151.211.202/~william/apache2-directoryindex-error.tgz
(let me know if you have any problems retrieving that file; it may be
behind a firewall)

        -- 
        Knowmad Services Inc.
http://www.knowmad.com

(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