diff options
| author | bbjay <bbjay@here.local> | 2013-05-18 18:50:58 +0200 |
|---|---|---|
| committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2013-05-19 11:48:57 +0200 |
| commit | 56d6fdbbf50b29bd162fd5ab3296a25127d7af65 (patch) | |
| tree | 513d571140750b7306a8fd1edf53c2b1001f734d /docs/ref | |
| parent | 413735b239239bc8ff38ee893e8448daf9b2bff6 (diff) | |
Fixed #20452 -- Rename 'headers' to 'header fields'.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/request-response.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index 2fac7f2f9c..fc26eabf1a 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -578,20 +578,20 @@ streaming response if (and only if) no middleware accesses the instantiated with an iterator. Django will consume and save the content of the iterator on first access. -Setting headers -~~~~~~~~~~~~~~~ +Setting header fields +~~~~~~~~~~~~~~~~~~~~~ -To set or remove a header in your response, treat it like a dictionary:: +To set or remove a header field in your response, treat it like a dictionary:: >>> response = HttpResponse() >>> response['Cache-Control'] = 'no-cache' >>> del response['Cache-Control'] Note that unlike a dictionary, ``del`` doesn't raise ``KeyError`` if the header -doesn't exist. +field doesn't exist. -HTTP headers cannot contain newlines. An attempt to set a header containing a -newline character (CR or LF) will raise ``BadHeaderError`` +HTTP header fields cannot contain newlines. An attempt to set a header field +containing a newline character (CR or LF) will raise ``BadHeaderError`` Telling the browser to treat the response as a file attachment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
