Forum: Ruby on Rails open digg.com time-out

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0e2b790bb24771a7fcd2c7407c72ce76?d=identicon&s=25 rosoft2001 (Guest)
on 2007-03-13 02:48
(Received via mailing list)
with
require 'open-uri'


I get a time-out error for:

open("http://www.digg.com")

and any other digg.com pages (like for http://digg.com/rss/index.xml)

If I use any other url everything works fine. (and http://www.digg.com
is available in the browser)


Any idea?

Thanks
24d2f8804e6bb4b7ea6bd11e0a586470?d=identicon&s=25 Jeremy Kemper (Guest)
on 2007-03-13 03:20
(Received via mailing list)
On 3/12/07, rosoft2001 <adingod@gmail.com> wrote:
>
> If I use any other url everything works fine. (and http://www.digg.com
> is available in the browser)

The other day I noticed the same, but using the curb bindings for
libcurl.

The connection just hangs. It's good to know this isn't a curb bug, at
least!

jeremy
0e2b790bb24771a7fcd2c7407c72ce76?d=identicon&s=25 rosoft2001 (Guest)
on 2007-03-14 15:25
(Received via mailing list)
I found it:

just use

open(url.to_s, "User-Agent" => "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 6.0)" )

probably they reject requests without an User-Agent...
This topic is locked and can not be replied to.