Skip to content
Myr

Better session logic.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent deb513c · Browse files · 1 file+7 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−6 removed

  • other:+7 added−6 removed

1 file+7 added−6 removed

modified:flask/sessions.py+7 added-6 removed
167 unmodified lines
168169 def save_session(self, app, session, response):170 expires = self.get_expiration_time(app, session)171 domain = self.get_cookie_domain(app)172 if not session:172 if session.modified and not session:173 response.delete_cookie(app.session_cookie_name,174 domain=domain)175 else:176 session.save_cookie(response, app.session_cookie_name,177 expires=expires, httponly=True, domain=domain)173 if session.modified:174 response.delete_cookie(app.session_cookie_name,175 domain=domain)176 return177 session.save_cookie(response, app.session_cookie_name,178 expires=expires, httponly=True, domain=domain)