Fixed #3881 -- skip saving session when response status is 500

Saving session data is somewhat likely to lead into error when the
status code is 500. It is guaranteed to lead into error if the reason
for the 500 code is query error on PostgreSQL.
This commit is contained in:
Anssi Kääriäinen 2012-07-05 18:09:48 +03:00
parent bebbbb7af0
commit aeda55e6bf
4 changed files with 34 additions and 7 deletions

View file

@ -423,6 +423,9 @@ cookie will be sent on every request.
Similarly, the ``expires`` part of a session cookie is updated each time the
session cookie is sent.
.. versionchanged:: 1.5
The session is not saved if the response's status code is 500.
Browser-length sessions vs. persistent sessions
===============================================