summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2015-01-12 14:45:09 -0800
committerTim Graham <timograham@gmail.com>2015-03-12 20:18:06 -0400
commitd861f95c445652e4269c9015836d14dcf8b9a587 (patch)
tree58542fc7c9525df3459468c912f685c04017749f /docs
parent7f8588d22ea3b53ba55d05922b67e7b3a0a7c91c (diff)
Fixed #24139 -- Changed HttpResponse.reason_phrase to evaluate based on status_code.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/request-response.txt18
-rw-r--r--docs/releases/1.9.txt7
2 files changed, 24 insertions, 1 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 0a7a75cdc7..a555ba76eb 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -631,6 +631,12 @@ Attributes
The `HTTP status code`_ for the response.
+ .. versionchanged:: 1.9
+
+ Unless :attr:`reason_phrase` is explicitly set, modifying the value of
+ ``status_code`` outside the constructor will also modify the value of
+ ``reason_phrase``.
+
.. attribute:: HttpResponse.reason_phrase
The HTTP reason phrase for the response.
@@ -642,6 +648,9 @@ Attributes
.. _`HTTP standard's`: https://www.ietf.org/rfc/rfc2616.txt
+ Unless explicitly set, ``reason_phrase`` is determined by the current
+ value of :attr:`status_code`.
+
.. attribute:: HttpResponse.streaming
This is always ``False``.
@@ -987,6 +996,12 @@ Attributes
The `HTTP status code`_ for the response.
+ .. versionchanged:: 1.9
+
+ Unless :attr:`reason_phrase` is explicitly set, modifying the value of
+ ``status_code`` outside the constructor will also modify the value of
+ ``reason_phrase``.
+
.. attribute:: StreamingHttpResponse.reason_phrase
The HTTP reason phrase for the response.
@@ -998,6 +1013,9 @@ Attributes
.. _`HTTP standard's`: https://www.ietf.org/rfc/rfc2616.txt
+ Unless explicitly set, ``reason_phrase`` is determined by the current
+ value of :attr:`status_code`.
+
.. attribute:: StreamingHttpResponse.streaming
This is always ``True``.
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index 00ae10b56b..da4984a9be 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -163,7 +163,12 @@ Templates
Requests and Responses
^^^^^^^^^^^^^^^^^^^^^^
-* ...
+* Unless :attr:`HttpResponse.reason_phrase
+ <django.http.HttpResponse.reason_phrase>` is explicitly set, it now is
+ determined by the current value of :attr:`HttpResponse.status_code
+ <django.http.HttpResponse.status_code>`. Modifying the value of
+ ``status_code`` outside of the constructor will also modify the value of
+ ``reason_phrase``.
Tests
^^^^^