Works for me too.

You aren't being stung by some institutional proxy server or something
like that (sorry I don't know much about networks) are you?  I imagine
ad.doubleclick.net gets a lot of hits.

Jon

-----Original Message-----
From: Nigel Gilbert [mailto:n.gilbert / soc.surrey.ac.uk]
Sent: 18 June 2003 19:25
To: ruby-talk ML
Subject: TCP/IP protocol and Net::HTTP


For almost all web sites, such as www.ruby-lang.org, the code

Net::HTTP.get_print 'www.ruby-lang.org', '/'

works without a problem, returning the home page.

However, 'ad.doubleclick.net' is an exception.  The code;

Net::HTTP.get_print 'ad.doubleclick.net', '/'

times out.  If you access this site in a web browser, there is no 
problem getting the home page from doubleclick; it arrives almost 
immediately.

By watching the ethernet traffic, it seems that doubleclick replies 
from a different IP address than the address corresponding to the 
domain name, but ruby keeps listening to responses from the domain 
address  (note this is _not_ a 302 redirect; it is all happening at a 
much lower level).  Eventually, there is a timeout error from 
/usr/local/lib/ruby/1.6/net/protocol.rb:449:in `initialize'.  Is this 
possible within the TCP/IP protocol?  Is this something that has been 
dealt with in a latter release (I am still using ruby 1.6.8).  Is there 
some workaround?

Nigel



________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp
_____________________________________________________________________
Any views or personal opinions expressed within this email may not be those of Talis Information Ltd.
The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.