summaryrefslogtreecommitdiff
path: root/lib/net/http.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/http.rb')
-rw-r--r--lib/net/http.rb4
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