Do not send session cookie on requests where session is not used/empty
authorGu1 <gu1@cafai.fr>
Fri, 12 Dec 2014 16:25:36 +0000 (17:25 +0100)
committerGu1 <gu1@cafai.fr>
Fri, 12 Dec 2014 16:25:36 +0000 (17:25 +0100)
ffdnispdb/sessions.py

index f909082..27db105 100644 (file)
@@ -71,6 +71,9 @@ class MySessionInterface(SessionInterface):
         return SQLSession(sid, self.db.engine, self.table, True)
 
     def save_session(self, app, session, response):
+        if not session and not session.modified:
+            return # empty/unused session
+
         if session.modified:
             session.save()