mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 09:33:59 +02:00
* lib/net/http: Do not handle Content-Encoding when the user sets Accept-Encoding. This allows users to handle Content-Encoding for themselves. This restores backwards-compatibility with Ruby 1.x. * lib/net/http/generic_request.rb: ditto. * lib/net/http/response.rb: ditto * test/net/http/test_http.rb: Test for the above. * test/net/http/test_http_request.rb: ditto. * test/net/http/test_httpresponse.rb: ditto. [ruby-trunk - Bug #7831] * lib/net/http.rb: Removed OpenSSL dependency from Net::HTTP. * test/net/http/test_http.rb: Remove Zlib dependency from tests. * test/net/http/test_http_request.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aea2c7ca50
commit
ddddf044b2
8 changed files with 117 additions and 3 deletions
|
@ -1410,6 +1410,7 @@ module Net #:nodoc:
|
|||
req.exec @socket, @curr_http_version, edit_path(req.path)
|
||||
begin
|
||||
res = HTTPResponse.read_new(@socket)
|
||||
res.decode_content = req.decode_content
|
||||
end while res.kind_of?(HTTPContinue)
|
||||
|
||||
res.uri = req.uri
|
||||
|
@ -1423,7 +1424,9 @@ module Net #:nodoc:
|
|||
raise
|
||||
rescue Net::ReadTimeout, IOError, EOFError,
|
||||
Errno::ECONNRESET, Errno::ECONNABORTED, Errno::EPIPE,
|
||||
OpenSSL::SSL::SSLError, Timeout::Error => exception
|
||||
# avoid a dependency on OpenSSL
|
||||
defined?(OpenSSL::SSL) ? OpenSSL::SSL::SSLError : IOError,
|
||||
Timeout::Error => exception
|
||||
if count == 0 && IDEMPOTENT_METHODS_.include?(req.method)
|
||||
count += 1
|
||||
@socket.close if @socket and not @socket.closed?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue