On Thu, 2003-01-16 at 20:51, Stas Bekman wrote:
> Vishal Verma wrote:
> > I am implementing a login/logout mechanism. The user can't access any
> > page till he logs in. That is any attempt to access pages without
> > logging in will be redirected to the login screen. I have successfully
> > implemented this part. The login page is generated by a CGI script. Once
> > the user logs in successfully, I want to set a cookie. That's the reason
> > why I want the login CGI script to pass the result to my handler. The
> > handler, which must be run after the CGI script has been run, will
> > decide to modify the output header (to set cookie) depending upon the
> > result code passed to it by the login screen.
> 
> I don't understand why don't you do that in your cgi script (btw, is it 
> running under mod_perl/registry or just mod_cgi?). Why do you need yet 
> another handler?

Basically, I want to keep all the login/logoff logic in one place -
.i.e. mod_perl handlers. My script is running under mod_perl.

> If it's a mod_perl registry script, you have an access to the request 
> object. Either via my $r = shift; at the beginning of your script or via 
> Apache->request (which retrieves the globally stored req object)

This worked!

thanks
-vish

Reply via email to