You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by yow <sp...@vancouver.yi.org> on 2001/01/03 09:26:27 UTC

Add to default chain of handlers

Hi I wonder how would I be able to add a perl handler in front of all the
default handlers that are being used by apache.
Reason being, I have implemented DBI enabled authentication for my site.
There are several modules that do the authentication/autorization based
on users ability to access particular url. When user goes to the generic url,
they are authenticated and redirected to their home url, which is rewritten
again, to single SSI file. That needs to be executed. So here it goes:

<Location /members>
PerlAuthHandler Moo::Auth
PerlAuthzHandler Moo::MemberAuth
PerlAuthzHandler Moo::MembershipType
PerlSetvar MembershipTypeRequired Premium

---> Here were it breaks down
SetHandler perl-script
PerlHandler Moo::Redirect

---> Here what works, but makes me feel weird about that.
PerlAuthzHandler Moo::Redirect

Require valid-user
</Location>

Some stuff above may not be exact, but the parts that break, are ones pointed out above.

I understand that I clobber the chain of the default handlers that are used
by apache in this case. What I am interested in is to use MY perl-script
handler first, and then invoke default apache handlers for particular part
of the webserver if the Handler finds some conditions not acceptable.
Such as user trying to access a SSI file. Or view an HTML file... or other.
Thank you for your time, reading this far.
	Pavel