mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c1b24588d3
commit
3f34ecc536
2 changed files with 7 additions and 1 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 17:42:54 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
Mon Oct 11 17:42:54 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* error.c (syserr_initialize): use mesg's encoding when locale
|
* error.c (syserr_initialize): use mesg's encoding when locale
|
||||||
|
|
|
@ -883,7 +883,7 @@ module Net #:nodoc:
|
||||||
the_body = r.read_body dest, &block
|
the_body = r.read_body dest, &block
|
||||||
case r["content-encoding"]
|
case r["content-encoding"]
|
||||||
when "gzip"
|
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")
|
r.delete("content-encoding")
|
||||||
when "deflate"
|
when "deflate"
|
||||||
r.body= Zlib::Inflate.inflate(the_body);
|
r.body= Zlib::Inflate.inflate(the_body);
|
||||||
|
|
Loading…
Add table
Reference in a new issue