From 690ce9b353bc0a86d0886470adbaa50e813de3b8 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Tue, 5 May 2009 18:41:13 +0000 Subject: Fix for issue1153027, making Py3k changes similar to fix in issue918368. This will address: a) urllib/ in py3k, b) urllib in py2x is addressed by issue918368. c) urllib2 in py2x was already addressed in Revision 43132. --- Lib/urllib/request.py | 1 + 1 file changed, 1 insertion(+) (limited to 'Lib/urllib/request.py') diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 42e6d17206..89ac22a8f1 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1398,6 +1398,7 @@ class URLopener: def open(self, fullurl, data=None): """Use URLopener().open(file) instead of open(file, 'r').""" fullurl = unwrap(to_bytes(fullurl)) + fullurl = quote(fullurl, safe="%/:=&?~#+!$,;'@()*[]") if self.tempcache and fullurl in self.tempcache: filename, headers = self.tempcache[fullurl] fp = open(filename, 'rb') -- cgit v1.2.1