Message124019
The order of the IP addresses doesn't matter as urllib2 is flexible enough to handle all local IP addresses as local (that was the original bug - it handled only one IP returned by gethostbyname which returned a random IP if there were more than one).
So picking up the first IP is ok I think as the order of the IP addresses doesn't matter - urllib2 will handle all of them as local.
See urllib2.FileHandler.get_names().
The problem is that gethostbyname doesn't guarantee that it returns one IP address from the set returned by gethostbyname_ex as gethostbyname looks up the name in /etc/hosts file first (or as configured in NSS). |
|
Date |
User |
Action |
Args |
2010-12-15 14:01:54 | csernazs | set | recipients:
+ csernazs, orsenthil, dmorr, ned.deily |
2010-12-15 14:01:53 | csernazs | set | messageid: <1292421713.97.0.320098997563.issue5625@psf.upfronthosting.co.za> |
2010-12-15 14:01:52 | csernazs | link | issue5625 messages |
2010-12-15 14:01:52 | csernazs | create | |
|