mirror of
https://github.com/django/daphne.git
synced 2025-07-13 01:12:17 +03:00
Fix more python 3 unicode issues
This commit is contained in:
parent
be172045ed
commit
49cbf31872
|
@ -34,7 +34,7 @@ class AsgiRequest(http.HttpRequest):
|
||||||
# Path info
|
# Path info
|
||||||
# TODO: probably needs actual URL decoding
|
# TODO: probably needs actual URL decoding
|
||||||
self.path = self.message['path'].decode("ascii")
|
self.path = self.message['path'].decode("ascii")
|
||||||
self.script_name = self.message.get('root_path', '')
|
self.script_name = self.message.get('root_path', b'')
|
||||||
if self.script_name:
|
if self.script_name:
|
||||||
# TODO: Better is-prefix checking, slash handling?
|
# TODO: Better is-prefix checking, slash handling?
|
||||||
self.path_info = self.path[len(self.script_name):]
|
self.path_info = self.path[len(self.script_name):]
|
||||||
|
@ -44,7 +44,7 @@ class AsgiRequest(http.HttpRequest):
|
||||||
self.method = self.message['method'].upper()
|
self.method = self.message['method'].upper()
|
||||||
self.META = {
|
self.META = {
|
||||||
"REQUEST_METHOD": self.method,
|
"REQUEST_METHOD": self.method,
|
||||||
"QUERY_STRING": self.message.get('query_string', '').decode("ascii"),
|
"QUERY_STRING": self.message.get('query_string', b'').decode("ascii"),
|
||||||
# Old code will need these for a while
|
# Old code will need these for a while
|
||||||
"wsgi.multithread": True,
|
"wsgi.multithread": True,
|
||||||
"wsgi.multiprocess": True,
|
"wsgi.multiprocess": True,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user