diff --git a/channels/handler.py b/channels/handler.py index 42fe00e..8c2f61d 100644 --- a/channels/handler.py +++ b/channels/handler.py @@ -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 diff --git a/channels/tests/test_handler.py b/channels/tests/test_handler.py index 7dc1c7c..516ec16 100644 --- a/channels/tests/test_handler.py +++ b/channels/tests/test_handler.py @@ -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"], diff --git a/docs/asgi.rst b/docs/asgi.rst index 2a5f9a7..6916471 100644 --- a/docs/asgi.rst +++ b/docs/asgi.rst @@ -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