From 0d375e732d83c96451a671f7eb9522c773cd3038 Mon Sep 17 00:00:00 2001 From: knu Date: Wed, 5 Jan 2011 04:58:57 +0000 Subject: * lib/net/http.rb (Net::HTTP#get): A header hash given should not be modified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/net/http.rb b/lib/net/http.rb index cc0a0b20dc..fac9a0beb1 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -987,7 +987,9 @@ module Net #:nodoc: res = nil if HAVE_ZLIB unless initheader.keys.any?{|k| k.downcase == "accept-encoding"} - initheader["accept-encoding"] = "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + initheader = initheader.merge({ + "accept-encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + }) @compression = true end end -- cgit v1.2.3