diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2012-07-08 09:20:27 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2012-07-08 09:20:27 (GMT) |
commit | 5d60e56a1744066c0c1e05639e098f148fb29ba8 (patch) | |
tree | 4eb69718b66c78637cfcaa8133e17114aafecd23 | |
parent | 01fe5fa8ea52ba49063d20a5044fb84efdbabe48 (diff) | |
download | cpython-5d60e56a1744066c0c1e05639e098f148fb29ba8.zip cpython-5d60e56a1744066c0c1e05639e098f148fb29ba8.tar.gz cpython-5d60e56a1744066c0c1e05639e098f148fb29ba8.tar.bz2 |
revert the changes done in d931a3b64fd6 - buildbot failure.
The fix for issue14826 might need to address toBytes and test_url_encoding in
test_cookielib.py before it is brought back in.
-rw-r--r-- | Lib/test/test_urllib2.py | 6 | ||||
-rw-r--r-- | Lib/urllib2.py | 3 | ||||
-rw-r--r-- | Misc/NEWS | 5 |
3 files changed, 1 insertions, 13 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index dd5ff8d8..fc76a6c 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1325,12 +1325,6 @@ class RequestTests(unittest.TestCase): req = Request("<URL:http://www.python.org>") self.assertEqual("www.python.org", req.get_host()) - def test_quoted_full_url(self): - Request = urllib2.Request - request = Request('http://www.python.org/foo bar') - self.assertEqual(request.get_full_url(), - 'http://www.python.org/foo%20bar') - def test_url_fragment(self): req = Request("http://www.python.org/?qs=query#fragment=true") self.assertEqual("/?qs=query", req.get_selector()) diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 944f622..ebf5811 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -196,8 +196,7 @@ class Request: def __init__(self, url, data=None, headers={}, origin_req_host=None, unverifiable=False): # unwrap('<URL:type://host/path>') --> 'type://host/path' - self.__original = unwrap(toBytes(url)) - self.__original = quote(self.__original, safe="%/:=&?~#+!$,;'@()*[]|") + self.__original = unwrap(url) self.__original, self.__fragment = splittag(self.__original) self.type = None # self.__r_type is what's left after doing the splittype @@ -84,11 +84,6 @@ Core and Builtins Library ------- -- Issue #14826: Quote urls in urllib2.Request identically to how they - are quoted by urllib.URLopener. Allows urls to spaces in them to work - transparently with urllib.request.urlopen(...). Patch contributed by Stephen - Thorne. - - Issue #15247: FileIO now raises an error when given a file descriptor pointing to a directory. |