Remove status_text from the HTTP response spec.

This commit is contained in:
Andrew Godwin 2016-03-11 10:30:40 -08:00
parent 9f8bf30cdd
commit 5bf19f52f6
3 changed files with 1 additions and 7 deletions

View File

@ -242,7 +242,6 @@ class AsgiHandler(base.BaseHandler):
# Make initial response message
message = {
"status": response.status_code,
"status_text": response.reason_phrase.encode("ascii"),
"headers": response_headers,
}
# Streaming responses need to be pinned to their iterator

View File

@ -58,7 +58,6 @@ class HandlerTests(SimpleTestCase):
# Make sure the message looks correct
self.assertEqual(reply_message["content"], b"Hi there!")
self.assertEqual(reply_message["status"], 200)
self.assertEqual(reply_message["status_text"], b"OK")
self.assertEqual(reply_message.get("more_content", False), False)
self.assertEqual(
reply_message["headers"],

View File

@ -509,10 +509,6 @@ Keys:
* ``status``: Integer HTTP status code.
* ``status_text``: Byte string HTTP reason-phrase, e.g. ``OK`` from ``200 OK``.
Ignored for HTTP/2 clients. Optional, default should be based on ``status``
or left as empty string if no default found.
* ``headers``: A list of ``[name, value]`` pairs, where ``name`` is the
byte string header name, and ``value`` is the byte string
header value. Order should be preserved in the HTTP response. Header names
@ -881,7 +877,7 @@ WSGI's ``environ`` variable to the Request message:
The ``start_response`` callable maps similarly to Response:
* The ``status`` argument becomes ``status`` and ``status_text``
* The ``status`` argument becomes ``status``, with the reason phrase dropped.
* ``response_headers`` maps to ``headers``
It may even be possible to map Request Body Chunks in a way that allows