From: "André" Date: 2007-12-14T21:00:01+09:00 Subject: Re: Ruby/Gnome app hangs when http'ing from inside a thread (linux only) > >And this error only happens on linux. Has anybody ever experienced > >anything like it? > > Why it happens only on linux, I'm not really sure I made a mistake: the same problem happens both in Linux and Windows. > While I haven't tried this, I think you might be able to magically > solve this simply through the wonders of the standard library: > > require 'resolv-replace' It worked great under Linux! Unfortunately, this seems not to work under Windows... :( It simply doesn't resolve. > I think the way to fix this is to replace the default resolver with an > alternative version that plays nicely with ruby threads - i.e. by > wrapping a native async DNS library, or a implementing one in pure > ruby. I think this might be the way to go under Windows. The problem is: the page where I'm downloading from depends on virtual host. So I can't open with HTTP.new('10.20.30.40') since it'll return different results that opening with HTTP.new('virtual.host.com'). Is there any way that I can open a HTTP connection with a IP and then send a virtual host on the HTTP request? Regards, André