Project

General

Profile

Bug #14829 » http.rb.patch

MSP-Greg (Greg L), 06/06/2018 10:08 PM

View differences:

lib/net/http.rb
res = catch(:response) {
req.exec @socket, @curr_http_version, edit_path(req.path)
begin
res = HTTPResponse.read_new(@socket)
if Net::HTTP::Post === req && RUBY_PLATFORM[/mingw|mswin/]
Timeout.timeout(@write_timeout, Net::WriteTimeout) {
res = HTTPResponse.read_new(@socket)
}
else
res = HTTPResponse.read_new(@socket)
end
res.decode_content = req.decode_content
end while res.kind_of?(HTTPInformation)
......
}
rescue Net::OpenTimeout
raise
rescue Net::ReadTimeout, IOError, EOFError,
rescue Net::WriteTimeout, Net::ReadTimeout, IOError, EOFError,
Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE,
# avoid a dependency on OpenSSL
defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError,
(1-1/2)