mirror of
https://github.com/django/daphne.git
synced 2025-07-10 16:02:18 +03:00
Fix accidental cast to byte string under Python 2
While grepping for calls to str(), I found this bit which looks like a cast to unicode was intended under Python 2.
This commit is contained in:
parent
c2baa32a9c
commit
a3944eff5e
|
@ -269,7 +269,7 @@ class WebRequest(http.Request):
|
||||||
(b"Content-Type", b"text/html; charset=utf-8"),
|
(b"Content-Type", b"text/html; charset=utf-8"),
|
||||||
],
|
],
|
||||||
"content": (self.error_template % {
|
"content": (self.error_template % {
|
||||||
"title": str(status) + " " + status_text.decode("ascii"),
|
"title": six.text_type(status) + " " + status_text.decode("ascii"),
|
||||||
"body": body,
|
"body": body,
|
||||||
}).encode("utf8"),
|
}).encode("utf8"),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user