diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/net/http.rb | 2 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Mon Oct 11 20:20:23 2010 NARUSE, Yui <naruse@ruby-lang.org> + + * lib/net/http.rb (HTTP.get): specify ASCII-8BIT as the result + encoding of Zlib::GzipReader. + http://hibari.2ch.net/test/read.cgi/tech/1281473294/271 + Mon Oct 11 14:03:54 2010 NARUSE, Yui <naruse@ruby-lang.org> * error.c (syserr_initialize): set the encoding of Errno::*#message 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); @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 66 +#define RUBY_PATCHLEVEL 67 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |