Browse Source

Backout last change, save_cookie by itself does that

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

5
flask/sessions.py

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

Loading…
Cancel
Save