From f58d39807541d8f50ba682183ab9097ddcb52698 Mon Sep 17 00:00:00 2001 From: drbrain Date: Thu, 14 Feb 2013 01:08:19 +0000 Subject: * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/net/http/test_httpresponse.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'test/net/http/test_httpresponse.rb') diff --git a/test/net/http/test_httpresponse.rb b/test/net/http/test_httpresponse.rb index 121b81fe96..974f8296cc 100644 --- a/test/net/http/test_httpresponse.rb +++ b/test/net/http/test_httpresponse.rb @@ -86,6 +86,7 @@ x\x9C\xCBH\xCD\xC9\xC9\a\x00\x06,\x02\x15 EOS res = Net::HTTPResponse.read_new(io) + res.decode_content = true body = nil @@ -118,6 +119,7 @@ x\x9C\xCBH\xCD\xC9 EOS res = Net::HTTPResponse.read_new(io) + res.decode_content = true body = nil @@ -134,6 +136,29 @@ EOS end end + def test_read_body_content_encoding_deflate_disabled + io = dummy_io(<