diff options
author | Ian Bicking <ianb@colorstudy.com> | 2010-09-01 17:57:56 -0500 |
---|---|---|
committer | Ian Bicking <ianb@colorstudy.com> | 2010-09-01 17:57:56 -0500 |
commit | 3ea8226f309aedbae6e6deca3a596a38903bbc57 (patch) | |
tree | 6ada66bc05b8a6b9cdf26aec8c7850057c7dcef0 /tests | |
parent | 301f7878e5868b37d6db11540c57c7a8ced6e269 (diff) | |
download | paste-3ea8226f309aedbae6e6deca3a596a38903bbc57.tar.gz |
Fix http://trac.pythonpaste.org/pythonpaste/ticket/398 -- properly reject dates that have out-of-range values
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_httpheaders.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_httpheaders.py b/tests/test_httpheaders.py index 3cd7e67..8c560d2 100644 --- a/tests/test_httpheaders.py +++ b/tests/test_httpheaders.py @@ -147,3 +147,13 @@ def test_normalize(): ('Expires', 'Entity An-Expiration-Date'), ('Unknown-Header', 'Unknown Sorted Last')] +def test_if_modified_since(): + from paste.httpexceptions import HTTPBadRequest + date = 'Thu, 34 Jul 3119 29:34:18 GMT' + try: + x = IF_MODIFIED_SINCE.parse({'HTTP_IF_MODIFIED_SINCE': date, + 'wsgi.version': (1, 0)}) + except HTTPBadRequest: + pass + else: + assert 0 |