Ticket #512: cp-session_cookie.diff
-
cherrypy/filters/sessionfilter.py
old new 7 7 Variables used to store config options: 8 8 - sess.session_timeout: timeout delay for the session 9 9 - sess.session_locking: mechanism used to lock the session ('implicit' or 'explicit') 10 - sess.session_cookie: expire the cookie at the end of the browser session. 10 11 11 12 Variables used to store temporary variables: 12 13 - sess.session_storage (instance of the class implementing the backend) … … 80 81 81 82 # Read config options 82 83 sess.session_timeout = conf('session_filter.timeout', 60) 84 sess.session_cookie = conf('session_filter.session_cookie', False) 83 85 sess.session_locking = conf('session_filter.locking', 'explicit') 84 86 sess.on_create_session = conf('session_filter.on_create_session', 85 87 lambda data: None) … … 160 162 # the browser 161 163 # So we have to use the old "expires" ... sigh ... 162 164 #cookie[cookie_name]['max-age'] = sess.session_timeout * 60 163 if sess.session_timeout:165 if not sess.session_cookie: 164 166 gmt_expiration_time = time.gmtime(time.time() + 165 167 (sess.session_timeout * 60)) 166 168 cookie[cookie_name]['expires'] = httptools.HTTPDate(gmt_expiration_time)

