Skip to content
Myr

Backout last change, save_cookie by itself does that

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 585bf02 · Browse files · 1 file+6 added−7 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+6 added−7 removed

  • other:+6 added−7 removed

1 file+6 added−7 removed

modified:flask/sessions.py+6 added-7 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: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)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)