mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Fix for Issue7751: urllib.urlopen("///C|/foo/bar/spam.foo")
This commit is contained in:
parent
e3467d5c96
commit
18d5a69669
2 changed files with 6 additions and 2 deletions
|
|
@ -179,7 +179,7 @@ class URLopener:
|
|||
fullurl = unwrap(toBytes(fullurl))
|
||||
# percent encode url, fixing lame server errors for e.g, like space
|
||||
# within url paths.
|
||||
fullurl = quote(fullurl, safe="%/:=&?~#+!$,;'@()*[]")
|
||||
fullurl = quote(fullurl, safe="%/:=&?~#+!$,;'@()*[]|")
|
||||
if self.tempcache and fullurl in self.tempcache:
|
||||
filename, headers = self.tempcache[fullurl]
|
||||
fp = open(filename, 'rb')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue