diff options
Diffstat (limited to 'lib/net/http.rb')
-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 |