mirror of
https://github.com/django/daphne.git
synced 2024-11-25 01:03:45 +03:00
Actually send status text
This commit is contained in:
parent
f90736413a
commit
c9f3b57ea3
|
@ -119,7 +119,7 @@ class WebRequest(http.Request):
|
||||||
if isinstance(status_text, six.text_type):
|
if isinstance(status_text, six.text_type):
|
||||||
logger.warn("HTTP status text for %s was text - should be bytes", self.reply_channel)
|
logger.warn("HTTP status text for %s was text - should be bytes", self.reply_channel)
|
||||||
status_text = status_text.encode("ascii")
|
status_text = status_text.encode("ascii")
|
||||||
self.setResponseCode(message['status'], )
|
self.setResponseCode(message['status'], status_text)
|
||||||
# Write headers
|
# Write headers
|
||||||
for header, value in message.get("headers", {}):
|
for header, value in message.get("headers", {}):
|
||||||
self.setHeader(header.encode("utf8"), value)
|
self.setHeader(header.encode("utf8"), value)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user