diamond-mechanize 2.3 → 2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/mechanize/http/agent.rb +2 -2
- metadata +1 -1
data/lib/mechanize/http/agent.rb
CHANGED
@@ -694,7 +694,7 @@ class Mechanize::HTTP::Agent
|
|
694
694
|
|
695
695
|
begin
|
696
696
|
zio = Zlib::GzipReader.new body_io
|
697
|
-
out_io = Tempfile.new 'mechanize-decode'
|
697
|
+
out_io = Tempfile.new 'mechanize-decode', :encoding => 'ascii-8bit'
|
698
698
|
out_io.binmode
|
699
699
|
|
700
700
|
until zio.eof? do
|
@@ -798,7 +798,7 @@ class Mechanize::HTTP::Agent
|
|
798
798
|
if StringIO === body_io and total > @max_file_buffer then
|
799
799
|
new_io = Tempfile.new 'mechanize-raw'
|
800
800
|
new_io.binmode if defined? binmode
|
801
|
-
|
801
|
+
new_io.set_encoding(body_io.external_encoding)
|
802
802
|
new_io.write body_io.string
|
803
803
|
|
804
804
|
body_io = new_io
|