diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-16 12:34:40 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-16 12:34:40 +0000 |
commit | b5d29771b941d490539cffa9645927c301e98afe (patch) | |
tree | 9d1dacb2c1a44cd580c68b46e4c95888afd3fec2 /lib | |
parent | e58b0f52b03e23c13a8b323e8ef60b30c43708be (diff) |
merges r30452 from trunk into ruby_1_9_2.
--
* 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/branches/ruby_1_9_2@30564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/http.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb index 5407975851..8abbf60e58 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -873,7 +873,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 |