Browse Source

Do not send session cookie on requests where session is not used/empty

Gu1 10 years ago
parent
commit
cb86562fec
1 changed files with 3 additions and 0 deletions
  1. 3 0
      ffdnispdb/sessions.py

+ 3 - 0
ffdnispdb/sessions.py

@@ -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()