mirror of
https://github.com/django/daphne.git
synced 2025-07-30 00:49:44 +03:00
parent
364d1e45b4
commit
004b34c67d
|
@ -57,9 +57,13 @@ class AsgiRequest(http.HttpRequest):
|
||||||
self.path_info = self.path
|
self.path_info = self.path
|
||||||
# HTTP basics
|
# HTTP basics
|
||||||
self.method = self.message['method'].upper()
|
self.method = self.message['method'].upper()
|
||||||
|
# fix https://github.com/django/channels/issues/622
|
||||||
|
query_string = self.message.get('query_string', '')
|
||||||
|
if isinstance(query_string, bytes):
|
||||||
|
query_string = query_string.decode('utf-8')
|
||||||
self.META = {
|
self.META = {
|
||||||
"REQUEST_METHOD": self.method,
|
"REQUEST_METHOD": self.method,
|
||||||
"QUERY_STRING": self.message.get('query_string', ''),
|
"QUERY_STRING": query_string,
|
||||||
"SCRIPT_NAME": self.script_name,
|
"SCRIPT_NAME": self.script_name,
|
||||||
"PATH_INFO": self.path_info,
|
"PATH_INFO": self.path_info,
|
||||||
# Old code will need these for a while
|
# Old code will need these for a while
|
||||||
|
|
Loading…
Reference in New Issue
Block a user