New submission from Senthil Kumaran: localhost() returns a string and thishost() returns tuple. In urllib/request.py, for file:// protocol, there is a verification to check to if the host is in the localhost and check happens:
socket.gethostbyname(host) in (localhost() + thishost())): This is clearly wrong for the above mentioned reason. It should be changed to this, wrapping localhost with tuple() or making localhost return a tuple, which will be consistent with thishost socket.gethostbyname(host) in (tuple(localhost()) + thishost())): ---------- assignee: orsenthil messages: 173530 nosy: orsenthil priority: normal severity: normal status: open title: localhost() and thishost() in urllib/request.py type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16301> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com