Add url_bytes to Request (#1258)

We need to have access to the raw unparsed URL.
This commit is contained in:
John Doe 2018-07-16 21:13:27 +02:00 committed by Raphael Deem
parent cd22745e6b
commit a39a7ca9d5

View File

@ -48,10 +48,11 @@ class Request(dict):
'app', 'headers', 'version', 'method', '_cookies', 'transport',
'body', 'parsed_json', 'parsed_args', 'parsed_form', 'parsed_files',
'_ip', '_parsed_url', 'uri_template', 'stream', '_remote_addr',
'_socket', '_port', '__weakref__'
'_socket', '_port', '__weakref__', 'raw_url'
)
def __init__(self, url_bytes, headers, version, method, transport):
self.raw_url = url_bytes
# TODO: Content-Encoding detection
self._parsed_url = parse_url(url_bytes)
self.app = None