diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-05-08 11:10:23 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-05-08 11:10:23 +0000 |
| commit | 864b78135a61e33e4433c95fd760d04ed8fe4c50 (patch) | |
| tree | fa9f1b43edbcab60f5eadea147a0541c526c48c4 /docs/ref | |
| parent | 7935231ef086b5649136dfbb2e49e3e413ecb344 (diff) | |
Fixed #10188: prevent newlines in HTTP headers. Thanks, bthomas.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10709 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/request-response.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 8267a0ef2e..beefe5a1a8 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -444,6 +444,11 @@ To set a header in your response, just treat it like a dictionary:: >>> response = HttpResponse() >>> response['Pragma'] = 'no-cache' +.. versionadded:: 1.1 + +HTTP headers cannot contain newlines. An attempt to set a header containing a +newline character (CR or LF) will raise ``BadHeaderError`` + Telling the browser to treat the response as a file attachment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
