Fix Issue11703 - urllib2.geturl() does not return correct url when the original url contains #fragment. Patch Contribution by Santoso Wijaya.

This commit is contained in:
Senthil Kumaran 2011-04-13 07:01:19 +08:00
parent 3780542039
commit 2643041970
4 changed files with 31 additions and 5 deletions

View file

@ -158,7 +158,7 @@ class OtherNetworkTests(unittest.TestCase):
req = urllib.request.Request(urlwith_frag)
res = urllib.request.urlopen(req)
self.assertEqual(res.geturl(),
"http://docs.python.org/glossary.html")
"http://docs.python.org/glossary.html#glossary")
def test_custom_headers(self):
url = "http://www.example.com"