diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-05-08 11:15:23 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-05-08 11:15:23 +0000 |
| commit | 155ab07a5d40f5e0a426423cb8df3868a37a02f8 (patch) | |
| tree | b75328ea129d70b5b15a125a8fa4649622c4703b /tests/regressiontests/httpwrappers | |
| parent | a7faf6424a8193cbf8a3a8d017461188fe9ea9c9 (diff) | |
Fixed #10188: prevent newlines in HTTP headers. Thanks, bthomas.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10711 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/httpwrappers')
| -rw-r--r-- | tests/regressiontests/httpwrappers/tests.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/httpwrappers/tests.py b/tests/regressiontests/httpwrappers/tests.py index 15b872821c..04099be16e 100644 --- a/tests/regressiontests/httpwrappers/tests.py +++ b/tests/regressiontests/httpwrappers/tests.py @@ -444,6 +444,17 @@ Traceback (most recent call last): ... UnicodeEncodeError: ..., HTTP response headers must be in US-ASCII format +# Bug #10188: Do not allow newlines in headers (CR or LF) +>>> r['test\\rstr'] = 'test' +Traceback (most recent call last): +... +BadHeaderError: Header values can't contain newlines (got 'test\\rstr') + +>>> r['test\\nstr'] = 'test' +Traceback (most recent call last): +... +BadHeaderError: Header values can't contain newlines (got 'test\\nstr') + # # Regression test for #8278: QueryDict.update(QueryDict) # |
