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.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index f39451591f..d4329e53c3 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -883,7 +883,7 @@ module Net #:nodoc:
the_body = r.read_body dest, &block
case r["content-encoding"]
when "gzip"
- r.body= Zlib::GzipReader.new(StringIO.new(the_body)).read
+ r.body= Zlib::GzipReader.new(StringIO.new(the_body), encoding: "ASCII-8BIT").read
r.delete("content-encoding")
when "deflate"
r.body= Zlib::Inflate.inflate(the_body);