Bug #4037

Net/http keep alive bug

Added by Michael Fellinger almost 6 years ago. Updated over 5 years ago.

ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]


I've found a bug where if the target server sends an eof to the socket, net/http will raise an error. I've attached
a sample script to prove the bug and a patch to fix it. I wrote the patch against 1.8, but I think it should apply
to 1.9.


(This bug is from - I simply copied it here to get attention and proper tracking)

Some more information to reproduce the issue:


#1 Updated by Yui NARUSE almost 6 years ago

  • Status changed from Open to Assigned
  • Assignee set to Aaron Patterson

Please commit this.

#2 [ruby-core:36985] Updated by Koichi Sasada over 5 years ago

Can we close it?

#3 [ruby-core:37235] Updated by Hiroshi Nakamura over 5 years ago

  • Status changed from Assigned to Rejected
  • Assignee changed from Aaron Patterson to Hiroshi Nakamura

Sorry for late reply, and marking it as 'Rejected'. I'm just want to say that 'it's not a bug'. (We should have suitable label in the future.)

net/http requires to set 'use_ssl' flag manually before starting a connection.

require 'net/http'
c ="", 443)
c.use_ssl = true # HERE !!!
uri = => "", :port => 443, :path => "/rest/objects", :query => "listabletags")
p c.request(, {}))

Also available in: Atom PDF