Net:HTTP Timeout Bug

When I do an HTTP get on a URL that doesn’t exist using NET:HTTP, the
read_timeout value is ignored and the connection stays open forever.
I read somewhere that this is a known bug (Bug #949) but I was trying to
do a work around to close the connection.

I tried using http.finish as is shown in the Class description but this
won’t force the connection closed.

Can anyone help me out with a way to force an NET::HTTP connection
closed?

thanks in advance

Jackster

jackster the jackle wrote:

When I do an HTTP get on a URL that doesn’t exist using NET:HTTP, the
read_timeout value is ignored and the connection stays open forever.
I read somewhere that this is a known bug (Bug #949) but I was trying to
do a work around to close the connection.

I tried using http.finish as is shown in the Class description but this
won’t force the connection closed.

Can anyone help me out with a way to force an NET::HTTP connection
closed?

appears that applying something like

r25097 and r25098 for Ruby 1.8 & 1.9

should do it?
-r

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/net/http.rb?r1=25097&r2=25096&pathrev=25097