From: Nigel Gilbert Date: 2003-06-20T01:57:23+09:00 Subject: Summary: TCP/IP protocol and Net::HTTP Thanks to all who have run trials and especially to Guy Decoux who referenced an earlier discussion in ruby-talk that shed light on the problem (which was: Net::HTTP.get_print 'ad.doubleclick.net', '/' times out under MacOSX, but not on other platforms). My summary is: On MacOSX, the implementation of getaddrinfo (which is used to translate 'ad.doubleclick.net' into an IP address) starts by sending a query to the doubleclick DNS server using an IPv6 format. This DNS server should either respond with the desired IP address, or decline to do so. In fact, the doubleclick DNS server makes no response at all, and the Mac keeps waiting until eventually it times out. This explains why the problem only seems to occur only with the combination of (a) doubleclick [their DNS server is unusual [1] in that it doesn't respond) and (b) MacOS X (this implementation of getaddrinfo first tries an IPv6 format, and then backs down to an IPv4 format query, while other ruby implementations don't attempt an IPv6 query at all). The work around (not yet tried) is to rebuild ruby with the configure options: --enable-ipv6 \ --with-lookup-order-hack=INET which essentially says try IPv4 before IPv6 The earlier ruby-talk thread related to all this starts at 66245 I hope that the above options could become the default in the next release. Nigel [1] Or perhaps one could say, 'buggy' On Thursday, June 19, 2003, at 05:33 PM, Michael Campbell wrote: > --- Jim Menard wrote: >> Nigel Gilbert writes: >> >>> If there is someone out there using MacOSX, could you try it and >> see >>> whether this theory is correct? What you need to do is: >> >> I just tried under OS X and see the same timeout problem. > > As Guy mentioned, this is a doubleclick issue; they're not responding > to AAAA (ipv6?) requests, which is what Ruby is issuing. > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > >