Issue #870 resolved

Support "session cookies" which flush on browser close

created an issue

In order to expire session cookies on browser close, it was suggested to use tools.sessions.timeout: None. However this produces a server fault.

{{{ Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/cherrypy/", line 609, in respond'before_finalize') File "/usr/lib/python2.5/site-packages/cherrypy/", line 98, in run hook() File "/usr/lib/python2.5/site-packages/cherrypy/", line 58, in call return self.callback(*self.kwargs) File "/usr/lib/python2.5/site-packages/cherrypy/lib/", line 565, in save File "/usr/lib/python2.5/site-packages/cherrypy/lib/", line 123, in save t = datetime.timedelta(seconds = self.timeout * 60) TypeError: unsupported operand type(s) for : 'NoneType' and 'int' }}}

Comments (2)

  1. Robert Brewer

    Fixed in [2062] via a new `tools.sessions.persistent` arg; default is True--set to False to retain a timeout on session storage but omit the `expires` param in the cookie.

  2. Log in to comment