karl added the comment:

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.

----------
keywords: +patch
Added file: http://bugs.python.org/file36832/issue18119-code-only.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18119>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to