Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 34551) +++ lib/net/http.rb (working copy) @@ -1356,7 +1356,10 @@ module Net #:nodoc: } end_transport req, res res - rescue EOFError, Errno::ECONNRESET => exception + rescue IOError, EOFError, + Errno::ECONNRESET, Errno::ECONNABORTED, Errno::ECONNRESET, + Errno::EPIPE, Errno::EINVAL, + OpenSSL::SSL::SSLError, Timeout::Error => exception if count == 0 && IDEMPOTENT_METHODS_.include?(req.method) count += 1 @socket.close if @socket and not @socket.closed?