Added SESSION_REFRESH_EACH_REQUEST config option.

This also changes how sessions are being refreshed.  With the new
behavior set-cookie is only emitted if the session is modified or if the
session is permanent.  Permanent sessions can be set to not refresh
automatically through the SESSION_REFRESH_EACH_REQUEST config key.

This fixes #798.
This commit is contained in:
Armin Ronacher 2013-07-30 16:43:54 +02:00
parent 1a66a7e110
commit d1d835c023
5 changed files with 96 additions and 0 deletions

View file

@ -8,6 +8,13 @@ Version 1.0
(release date to be announced, codename to be selected)
- Added ``SESSION_REFRESH_EACH_REQUEST`` config key that controls the
set-cookie behavior. If set to `True` a permanent session will be
refreshed each request and get their lifetime extended, if set to
`False` it will only be modified if the session actually modifies.
Non permanent sessions are not affected by this and will always
expire if the browser window closes.
Version 0.10.2
--------------