[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support
Derek Morr
report at bugs.python.org
Thu Jan 1 19:49:05 CET 2009
Derek Morr <derekmorr at psu.edu> added the comment:
Senthil,
I don't think your gethost_addrinfo() function will work. On a v6-
enabled machine, it will only return v6 or v4 names. Shouldn't it
return both (since a machine could have both v4 and v6 addresses)? For
example, on my machine, I have the following addresses for
"localhost": ::1, fe80::1%lo0, 127.0.0.1.
Also, why is the AI_CANONNAME flag set? The canonname field isn't used.
And you only appear to take the last IP address returned (sa[0]).
Shouldn't you return all the addresses?
----------
nosy: +dmorr
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1675455>
_______________________________________
More information about the Python-bugs-list
mailing list