From: Robert Klemme on
On 04/19/2010 11:57 PM, Daniel Waite wrote:
> system(%{echo "HEAD / HTTP/1.1\nHOST: www.rabbitcreative.com\n\n" | nc
> http://www.rabbitcreative.com 80})
>
> Really? Ruby's Net/* libraries suck, apparently.

On what basis do you come to this conclusion? Maybe your webserver is
not accepting all connection attempts to control the load. Maybe there
are network issues. So far I have not seen evidence that there is
something wrong with Ruby's net library. (Btw, which version are you
using?)

Cheers

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
From: Daniel Berger on


On Apr 19, 3:57 pm, Daniel Waite <rabbitb...(a)gmail.com> wrote:
> system(%{echo "HEAD / HTTP/1.1\nHOST:www.rabbitcreative.com\n\n" | nchttp://www.rabbitcreative.com80})
>
> Really? Ruby's Net/* libraries suck, apparently.

net-ping isn't part of the Ruby standard library. There's a ping
library, but net-ping is a different beast.

Also, your problem did inspire me to make one change, which is to
alter the Net::Ping::HTTP class so that a URI without a path assumes
'/' for the path.

Regards,

Dan