perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject RE: Exit frustration
Date Wed, 13 Dec 2006 07:02:26 GMT
> 
> [$ var $dummy $]
> [- # Just clear the user session information to leave cleanly, inform
>    # the user he has logged out, and redirect to the login screen
>    delete $udat{login};
>    delete $udat{passwd};
>    $epreq->{warnings}->add_msg('Su sesi&oacute;n ha finalizado');
>    $epreq->{webclient}->redirect('login.html');
> -]
> 
> (of course, $epreq->{webclient} is an instantiated 
> SmbGate::Embperl::WebClient, invoked at base.pm's init)
> 

In your module, you should call Embperl::exit (301) instead of just exit,
because calling exit only, will terminate the whole Apache child, which is
not what you want.

The main problem will be, that this will exit the whole request and you
didn't have set the headers for redirect so far

So the question is where do you set your http headers?

> You will notice I'm using $epreq to hold my various objects 
> so they are available along the way - I lack a better way of 
> doing this, you might also point me out to another way of 
> doing this :)

$epreq is a perfect place for storing such things

Gerald



 
** Virus checked by BB-5000 Mailfilter ** 


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message