Martin Moss wrote on 11/10/05, 1:25 PM:

 > Although saying that I was trying to do a set_handlers
 > for the contentphase... which was being completely
 > ignored by apache...


Marty,
Not sure it's related, but I had what sounds like a similar problem with 
an authorization handler. I wanted to return different content if the 
user wasn't authorized instead of just the normal 403 error.

Initially I was doing this:

$r->set_handlers(PerlHandler => ['Apache::MyModule::DeniedUserPage']);

Where DeniedUserPage would get called at the content phase to return the 
(customized) authorization failed content.

But it didn't work. In order to get it to work I had to add:

$r->handler('perl-script');

I think it's because the url the user was requesting wasn't normally 
handled by mod_perl at the content phase, so my inserting the content 
handler I had to force mod_perl to catch it.

(It seems like setting a PerlHandler should automatically trigger this 
to happen, but I couldn't get it to work without it. Disclaimer: This is 
under mod_perl 1.26, behavior on other versions may be different.)


    --John

Reply via email to