[issue2244] urllib and urllib2 decode userinfo multiple times

Theodore Turocy report at bugs.python.org
Sun Aug 1 03:23:58 CEST 2010


Theodore Turocy <drarbiter at gmail.com> added the comment:

I am attaching a patch against py3k which adds some tests to demonstrate the original bug when issuing a Request() to a ftp:// URL.

To do this, the tests add checks for user and passwd.  The previous version of checks asserted that the .user and .passwd of the returned request should be "".  Checking .user is necessary to verify the original bug.  

I was confused by a comment in the fixture, "ftp authentication not yet implemented by FTPHandler", which appeared to justify the assumption that .user and .passwd must be "".  This may be true, but .user and .passwd are being set by the Request.  The test includes the minimal augmentation to extend on the original behavior of the test.  Someone with greater knowledge than I might look at that comment to see if it is out-of-date, or simply too vague.

----------
nosy: +ted.turocy
Added file: http://bugs.python.org/file18295/urllib_ftptests_doubleencode.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2244>
_______________________________________


More information about the Python-bugs-list mailing list