From c6e56d74040e480cda56a66f5e52d2ceafce5ca7 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 5 Aug 2012 07:41:07 +0200 Subject: [PATCH] Set expiration properly on session cookies. --- wrw/session.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wrw/session.py b/wrw/session.py index 273775b..43b9087 100644 --- a/wrw/session.py +++ b/wrw/session.py @@ -168,7 +168,9 @@ class db(object): return session(threading.RLock()) def mkcookie(self, req, sess): - cookie.add(req, self.cookiename, sess.id, path=self.path) + cookie.add(req, self.cookiename, sess.id, + path=self.path, + expires=cookie.cdate(time.time() + sess.expire)) def fetch(self, req): now = int(time.time()) -- 2.11.0