Re: [mp2] PerlAccessHandler not overriding PerlAuthenHandler

[prev] [thread] [next] [Date index for 2005/01/30]

From: Geoffrey Young
Subject: Re: [mp2] PerlAccessHandler not overriding PerlAuthenHandler
Date: 19:33 on 30 Jan 2005

> and I've tried all of the following to overide the AuthenHandler
> 
> $r->set_handlers(PerlAuthenHandler => []);
> $r->set_handlers(PerlAuthenHandler => undef)

those only remove the PerlAuthenHandler from the handler chain.  that is,
since you probably have mod_auth installed, apache will move first to
mod_perl then, when mod_perl says "I have no handlers to run," it will move
to mod_auth, which will then attempt it's authentiation.

> $r->set_handlers(PerlAuthenHandler => [\&OK]);

this is the correct approach - OK means "I authenticated" and lets apache
know that it should _not_ call mod_auth.

however, the symbol OK doesn't exist in your setup, so you are essentially
passing undef.  the proper solution is

  $r->set_handlers(PerlAuthenHandler => \&Apache::OK);

HTH

--Geoff

Re: [mp2] PerlAccessHandler not overriding PerlAuthenHandler
Geoffrey Young 19:33 on 30 Jan 2005

Generated at 12:39 on 05 Feb 2005 by mariachi v0.52