Browse Source

Better session logic.

pull/273/head
Armin Ronacher 14 years ago
parent
commit
585bf02ee0
  1. 5
      flask/sessions.py

5
flask/sessions.py

@ -169,9 +169,10 @@ class SecureCookieSessionInterface(SessionInterface):
def save_session(self, app, session, response):
expires = self.get_expiration_time(app, session)
domain = self.get_cookie_domain(app)
if session.modified and not session:
if not session:
if session.modified:
response.delete_cookie(app.session_cookie_name,
domain=domain)
else:
return
session.save_cookie(response, app.session_cookie_name,
expires=expires, httponly=True, domain=domain)

Loading…
Cancel
Save