Request.full_url now performs requoting of the path (like it does in Python 2).
Request.path_url no longer quotes the already-quoted path (double quoting).
Fixed utils.requote_path so it works properly in Python 3.
if isinstance(path, str):
path = path.encode('utf-8')
- path = requote_path(path)
+ path = requote_path(path)
url = (urlunparse([ scheme, netloc, path, params, query, fragment ]))
if not path:
path = '/'
- if is_py3:
- path = quote(path.encode('utf-8'))
-
url.append(path)
query = p.query
This function passes the given path through an unquote/quote cycle to
ensure that it is fully and consistently quoted.
"""
- parts = path.split(b"/")
- parts = (quote(unquote(part), safe=b"") for part in parts)
- return b"/".join(parts)
+ parts = path.split("/")
+ parts = (quote(unquote(part), safe="") for part in parts)
+ return "/".join(parts)