mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix issue14826 - make urllib.request.Request quoted url consistent with URLOpener open method.
Patch contributed by Stephen Thorne.
This commit is contained in:
commit
540715a369
3 changed files with 12 additions and 1 deletions
|
@ -263,7 +263,8 @@ class Request:
|
|||
origin_req_host=None, unverifiable=False,
|
||||
method=None):
|
||||
# unwrap('<URL:type://host/path>') --> 'type://host/path'
|
||||
self.full_url = unwrap(url)
|
||||
self.full_url = unwrap(to_bytes(url))
|
||||
self.full_url = quote(self.full_url, safe="%/:=&?~#+!$,;'@()*[]|")
|
||||
self.full_url, self.fragment = splittag(self.full_url)
|
||||
self.data = data
|
||||
self.headers = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue