Message228755
OK I fixed the code. The issue is here
https://hg.python.org/cpython/file/1e1c6e306eb4/Lib/urllib/request.py#l656
newurl = urlunparse(urlparts)
Basically it reinjects the fragment in the new url. The fix is easy.
if urlparts.fragment:
urlparts = list(urlparts)
urlparts[5] = ""
newurl = urlunparse(urlparts)
I was trying to make a test for it, but failed. Could someone help me for the test so I can complete the patch?
Added the code patch only. |
|
Date |
User |
Action |
Args |
2014-10-07 07:45:19 | karlcow | set | recipients:
+ karlcow, orsenthil, ezio.melotti, mher, BreamoreBoy, takahashi.shuhei |
2014-10-07 07:45:19 | karlcow | set | messageid: <1412667919.39.0.0601333801212.issue18119@psf.upfronthosting.co.za> |
2014-10-07 07:45:19 | karlcow | link | issue18119 messages |
2014-10-07 07:45:19 | karlcow | create | |
|