On Wednesday 06 August 2003 18:29, Geoffrey Young wrote:

> >     sub handler {
> >         my $r = shift;
> >
> >         return DECLINED if $r->content_type ne 'text/html';
> >         return SERVER_ERROR unless $r->can_stack_handlers;
> >
> >         $r->set_handlers(PerlHandler => ['ContentHandler']);
> >
> >         return OK;
> >     }
> >
> > What am I missing?
>
> unlike the other phases of the request cycle, for the content phase
> you need to do two things - tell apache that mod_perl is in charge,
> and tell mod_perl which Perl handler it should use.  you've done the
> latter.  for the former, use $r->handler('perl-script'), which is
> analogous to SetHandler perl-script that you would ordinarily see for
> a mod_perl setup.

Thank you!

I tried to add that line to the Dispatcher:

    package Dispatcher;

    use Apache::Constants ':common';

    sub handler {
        my $r = shift;

        return DECLINED if $r->content_type ne 'text/html';
        return SERVER_ERROR unless $r->can_stack_handlers;

        $r->handler('perl-script');
        $r->set_handlers(PerlHandler => ['ContentHandler']);

        return OK;
    }

    1;

without luck however, keeps on looking under the document root
for /admin. Should that change be enough?

-- fxn

Reply via email to