Browse Source

Backout last change, save_cookie by itself does that

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

13
flask/sessions.py

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

Loading…
Cancel
Save