summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/net/http.rb2
-rw-r--r--version.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 92bed7b945..e88cacd8a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);
diff --git a/version.h b/version.h
index 1344155706..be553a6b1e 100644
--- a/version.h
+++ b/version.h
@@ -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