diff options
-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:14:43 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:28:00 2013 Zachary Scott <zachary@zacharyscott.net> * thread.c: Document ThreadGroup::Default 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) |