I am having some problems with $Session->Abandon().
I have the following code on a logout page : use Data::Dumper; warnd("b4",Dumper $Session); $Session->Abandon(); warnd("after",Dumper $Session); $Response->Redirect("/login/login.asp");
Each time I print the contents of $Session, even after I have abandoned it, I get shown the same contents.
"warnd" is a logging function I use which just dumps to a file.
Why, even after I have abandoned a session, is there still data in the session object ?
$Session->Abandon makes a session timeout immediately. However, the session data will exist until the session manager cleans up that session, and calls Session_OnEnd on it. The effect of $Session->Abandon timing out a session immediately is that a web browser will get a new session on the *next* web request.
A more accurate way to do this might be to call Session_OnEnd immediately, but the problem remains then what state the $Session object is in after $Session->Abandon. If Session_OnEnd is called, it will be deleted. Perhaps one might want a new session created immediately after $Session->Abandon, but the HTTP headers might have already been sent by this time, so the browser would not be aware of it, so that does not seem like a good way to go.
If you think the existing strategy needs improvement, please discuss your ideas on this.
Regards,
Josh
________________________________________________________________ Josh Chamas, Founder phone:925-552-0128 Chamas Enterprises Inc. http://www.chamas.com NodeWorks Link Checking http://www.nodeworks.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]