summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-01-19 13:14:31 -0500
committerChris McDonough <chrism@plope.com>2011-01-19 13:14:31 -0500
commit765336ac32bac7de7e36047b15caadb71fceaf69 (patch)
treebf2bf8828d977b272cb1b2eb7b52b482dffdd0d7
parent4e370eb5ea657177e2c800ca86d2f6376cc9c991 (diff)
downloadpyramid-765336ac32bac7de7e36047b15caadb71fceaf69.tar.gz
pyramid-765336ac32bac7de7e36047b15caadb71fceaf69.tar.bz2
pyramid-765336ac32bac7de7e36047b15caadb71fceaf69.zip
- 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``.
-rw-r--r--CHANGES.txt6
-rw-r--r--pyramid/session.py4
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``.
"""