mirror of
https://github.com/django/daphne.git
synced 2025-04-21 17:22:03 +03:00
Remove path_info from request message format
This commit is contained in:
parent
c937c4da6d
commit
5106c7822c
|
@ -15,7 +15,6 @@ def encode_request(request):
|
|||
"cookies": request.COOKIES,
|
||||
"meta": {k: v for k, v in request.META.items() if not k.startswith("wsgi")},
|
||||
"path": request.path,
|
||||
"path_info": request.path_info,
|
||||
"method": request.method,
|
||||
"reply_channel": request.reply_channel,
|
||||
}
|
||||
|
@ -33,8 +32,9 @@ def decode_request(value):
|
|||
request.META = value['meta']
|
||||
request.path = value['path']
|
||||
request.method = value['method']
|
||||
request.path_info = value['path_info']
|
||||
request.reply_channel = value['reply_channel']
|
||||
# We don't support non-/ script roots
|
||||
request.path_info = value['path']
|
||||
return request
|
||||
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ Contains the following keys:
|
|||
* cookies: Dict of cookies as {cookie_name: cookie_value} (names and values are strings)
|
||||
* meta: Dict of HTTP headers and info as defined in the Django Request docs (names and values are strings)
|
||||
* path: String, full path to the requested page, without query string or domain
|
||||
* path_info: String, like ``path`` but without any script prefix. Often just ``path``.
|
||||
* method: String, upper-cased HTTP method
|
||||
|
||||
Should come with an associated ``reply_channel`` which accepts HTTP Responses.
|
||||
|
|
Loading…
Reference in New Issue
Block a user