Graham Dumpleton
graham.dumpleton at gmail.com
Tue May 20 05:25:40 EDT 2008
2008/5/20 Paolo Franzetti <paolo at lambrate.inaf.it>: > Dear all, > > in my application I have the simple line: > > current_session = Session.Session(req,timeout=3600) > > After having executed this command I can check if the > session is new using the current_session.is_new() functions. > > My question is: > is there a way to know if the session is new because the old > session (recovered from a cookie) has expired or because > there was no session to recover ? Session class uses cookie called 'pysid', so use SignedCookie/Cookie class to see if there is a cookie called 'pysid'. It isn't fool proof, but closest you will probably get. Graham
|