diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-08 11:30:58 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-08-08 11:30:58 (GMT) |
commit | 4c88db77a057ebe0a5a5496152d2099cf760e837 (patch) | |
tree | a4da8f131b4559913fb127cc6f152dd514934a9b /Lib/urllib | |
parent | 10215de1ba09b7608a390aeecbd6cde77c8522f1 (diff) | |
download | cpython-4c88db77a057ebe0a5a5496152d2099cf760e837.zip cpython-4c88db77a057ebe0a5a5496152d2099cf760e837.tar.gz cpython-4c88db77a057ebe0a5a5496152d2099cf760e837.tar.bz2 |
Merged revisions 83818 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83818 | senthil.kumaran | 2010-08-08 16:57:53 +0530 (Sun, 08 Aug 2010) | 4 lines
Fix Issue8280 - urllib2's Request method will remove fragements in the url.
This is how it should work,wget and curl work like this way too. Old behavior was wrong.
........
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index a26b763..3ea38f2 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -99,7 +99,7 @@ from urllib.error import URLError, HTTPError, ContentTooShortError from urllib.parse import ( urlparse, urlsplit, urljoin, unwrap, quote, unquote, splittype, splithost, splitport, splituser, splitpasswd, - splitattr, splitquery, splitvalue, to_bytes, urlunparse) + splitattr, splitquery, splitvalue, splittag, to_bytes, urlunparse) from urllib.response import addinfourl, addclosehook # check for SSL @@ -163,6 +163,7 @@ class Request: origin_req_host=None, unverifiable=False): # unwrap('<URL:type://host/path>') --> 'type://host/path' self.full_url = unwrap(url) + self.full_url, fragment = splittag(self.full_url) self.data = data self.headers = {} self._tunnel_host = None |