diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-24 06:19:29 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-02-24 06:19:29 +0000 |
commit | faa9fb59e3541be1c83d17c3bc76536ced1839af (patch) | |
tree | fb58362e20d142180a5254a9d2786bff095971f0 | |
parent | 495d8b0ec350ece15bc5d975a3cb29481745bc79 (diff) |
Merge trunk revision: 39463
* lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get.
[ruby-trunk - Bug #7924]
* test/net/http/test_http.rb: Test for the above.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@39464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/net/http.rb | 7 | ||||
-rw-r--r-- | test/net/http/test_http.rb | 2 |
3 files changed, 8 insertions, 7 deletions
@@ -1,3 +1,9 @@ +Sun Feb 24 15:16:00 2013 Eric Hodel <drbrain@segment7.net> + + * lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get. + [ruby-trunk - Bug #7924] + * test/net/http/test_http.rb: Test for the above. + Wed Feb 20 14:23:00 2013 Zachary Scott <zachary@zacharyscott.net> * thread.c: Grammar for #backtrace_locations and ::handle_interrupt diff --git a/lib/net/http.rb b/lib/net/http.rb index cc1b1c4a1f..4cb0408139 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1122,13 +1122,6 @@ module Net #:nodoc: # def get(path, initheader = {}, dest = nil, &block) # :yield: +body_segment+ res = nil - if HAVE_ZLIB - unless initheader.keys.any?{|k| k.downcase == "accept-encoding"} - initheader = initheader.merge({ - "accept-encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" - }) - end - end request(Get.new(path, initheader)) {|r| r.read_body dest, &block res = r diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb index 9a7300f481..0b3eeeb6bf 100644 --- a/test/net/http/test_http.rb +++ b/test/net/http/test_http.rb @@ -232,6 +232,8 @@ module TestNetHTTP_version_1_1_methods assert_nothing_raised { http.get('/', { 'User-Agent' => 'test' }.freeze) } + + assert res.decode_content, '[Bug #7924]' end def _test_get__iter(http) |