I'm running under mod_perl, not sure if that's relevant here or not... I think it is because I've been able to get this working in a non-mod_perl envrionment previously...

I'm attempting to validate a user's session in my cgi::app script. If the session cookie is not present, or the session is invalid, I want to redirect the user to the login module to get authenticated. The "order of operations" document has a nice example of how to do this from within init, but printing out the redirect headers and than issuing a die() to prevent the rest of the operations from executing.

This does not work for me. As soon as that die executes my script fails with the error:

Error executing class callback in init stage: Died at blah blah blah my code: if (!$ValidSession)
        {
        use CGI::Application::Plugin::Redirect;
        $self->teardown();
        print $self->redirect($FailureLocation);
       die;
        }

I've read every bit of documentation I can find and tried everything I can think of... I could really use some suggestions at this point.
Thanks!







#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to