On Sun, 23 Jul 2006, Hrvoje Niksic wrote:
If it works without IPv6, then it means that getaddrinfo on your machine sorts the results, whereas gethostbyname doesn't.
This effect has been seen (and reported) before on getaddrinfo vs gethostbyname and I've tried to get the glibc guys interested enough to answer why this is but have failed so far.
I can easily repeat this (bad) behaviour using a stand-alone test program using a very recent glibc, so this is in no way wget's fault.
If anyone would like to try the tests or dive further into this, my test program can be found here:
http://curl.haxx.se/mail/lib-2005-11/0008.html -- -=- Daniel Stenberg -=- http://daniel.haxx.se -=- ech`echo xiun|tr nu oc|sed 'sx\([s\x]\)\([\xoi]\)xo un\2\1 is xg'`ol