Net:HTTP Timeout Bug

  • Thread starter jackster the jackle
  • Start date
J

jackster the jackle

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
 
R

Roger Pack

jackster said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top