diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-05 04:58:57 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-05 04:58:57 +0000 |
commit | 0d375e732d83c96451a671f7eb9522c773cd3038 (patch) | |
tree | 310b9e6880e9b174af4c97b801193b01857ce1ba /lib | |
parent | 76731871e70398afbd044e16e9cf4151b471841b (diff) | |
download | ruby-0d375e732d83c96451a671f7eb9522c773cd3038.tar.gz |
* 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
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 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 |