mirror of
https://github.com/django/daphne.git
synced 2025-07-10 16:02:18 +03:00
Change to sending GET/POST as dicts of lists
This commit is contained in:
parent
39a82e2a5c
commit
062035f992
|
@ -18,6 +18,7 @@ class InterfaceProtocol(WebSocketServerProtocol):
|
||||||
self.channel_backend = channel_backends[DEFAULT_CHANNEL_BACKEND]
|
self.channel_backend = channel_backends[DEFAULT_CHANNEL_BACKEND]
|
||||||
self.request_info = {
|
self.request_info = {
|
||||||
"path": request.path,
|
"path": request.path,
|
||||||
|
"GET": request.params,
|
||||||
}
|
}
|
||||||
|
|
||||||
def onOpen(self):
|
def onOpen(self):
|
||||||
|
|
|
@ -8,8 +8,8 @@ def encode_request(request):
|
||||||
"""
|
"""
|
||||||
# TODO: More stuff
|
# TODO: More stuff
|
||||||
value = {
|
value = {
|
||||||
"GET": list(request.GET.lists()),
|
"GET": dict(request.GET.lists()),
|
||||||
"POST": list(request.POST.lists()),
|
"POST": dict(request.POST.lists()),
|
||||||
"COOKIES": request.COOKIES,
|
"COOKIES": request.COOKIES,
|
||||||
"META": {k: v for k, v in request.META.items() if not k.startswith("wsgi")},
|
"META": {k: v for k, v in request.META.items() if not k.startswith("wsgi")},
|
||||||
"path": request.path,
|
"path": request.path,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user