From 765336ac32bac7de7e36047b15caadb71fceaf69 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 19 Jan 2011 13:14:31 -0500 Subject: - The default value for the ``cookie_on_exception`` parameter to ``pyramid.session.UnencyrptedCookieSessionFactory`` is now ``True``. This means that when view code causes an exception to be raised, and the session has been mutated, a cookie will be sent back in the response. Previously its default value was ``False``. --- CHANGES.txt | 6 ++++++ pyramid/session.py | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 84b53b341..32d145c9f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -26,6 +26,12 @@ Backwards Incompatibilities through. Those deployments will need to configure ``repoze.who`` to also react to ``403 Forbidden``. +- The default value for the ``cookie_on_exception`` parameter to + ``pyramid.session.UnencyrptedCookieSessionFactory`` is now ``True``. This + means that when view code causes an exception to be raised, and the session + has been mutated, a cookie will be sent back in the response. Previously + its default value was ``False``. + 1.0a10 (2011-01-18) =================== diff --git a/pyramid/session.py b/pyramid/session.py index 9fbb79bf7..4e63ef460 100644 --- a/pyramid/session.py +++ b/pyramid/session.py @@ -44,7 +44,7 @@ def UnencryptedCookieSessionFactoryConfig( cookie_domain=None, cookie_secure=False, cookie_httponly=False, - cookie_on_exception=False, + cookie_on_exception=True, ): """ Configure a :term:`session factory` which will provide unencrypted @@ -89,7 +89,7 @@ def UnencryptedCookieSessionFactoryConfig( ``cookie_on_exception`` If ``True``, set a session cookie even if an exception occurs - while rendering a view. Default: ``False``. + while rendering a view. Default: ``True``. """ -- cgit v1.2.3