mirror of
https://github.com/django/daphne.git
synced 2025-07-14 18:02:17 +03:00
Fixed #210: Plus double-decoded for query string
This commit is contained in:
parent
405e5b3b26
commit
6ea6dc6576
|
@ -135,7 +135,11 @@ class AsgiRequest(http.HttpRequest):
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def GET(self):
|
def GET(self):
|
||||||
return http.QueryDict(self.message.get('query_string', '').encode("utf8"))
|
# Django will try and re-urldecode the string and interpret + as space;
|
||||||
|
# we re-encode + here to fix this.
|
||||||
|
return http.QueryDict(
|
||||||
|
self.message.get('query_string', '').replace("+", "%2b").encode("utf8"),
|
||||||
|
)
|
||||||
|
|
||||||
def _get_post(self):
|
def _get_post(self):
|
||||||
if not hasattr(self, '_post'):
|
if not hasattr(self, '_post'):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user