You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Michael L. Artz" <dr...@october29.net> on 2004/02/04 14:32:23 UTC

Passing Data to custom_response

I was wondering if it was possible to pass data from a handler to a 
custom_response declared handler within apache2/mod_perl2.  I am putting 
a custom_response on the the HTTP_FORBIDDEN return code to direct the 
user to a login page (custom_response(Apache::HTTP_FORBIDDEN, 
'login.pl')), so if the user/pass doesn't pass muster in the 
authentication phase, or if they aren't allow to view the page because 
their permissions aren't high enough in the authorization phase, the 
handler returns a custom page telling the user to login or what their 
error was.  I'd like to tell them why they are at the custom response 
page (i.e. they are required to login or they entered and invalid 
user/pass).  I've tried using notes and pnotes that I set in the 
authentication and authorization phases, but it looks like the 
custom_response actually creates a new request (or is it a subrequest?), 
and the notes and pnotes that I set aren't being seen by the 
ModPerl::Registry login page.  Is there any way to pass data to a 
custom_response defined page?  Any better ideas on how to handle this, 
other than putting it in a get request and redirecting?

Thanks
-Mike


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html