lib/io_streams/paths/http.rb in iostreams-1.0.0.beta4 vs lib/io_streams/paths/http.rb in iostreams-1.0.0.beta5
- old
+ new
@@ -84,10 +84,10 @@
# Since Net::HTTP download only supports a push stream, write it to a tempfile first.
Utils.temp_file_name('iostreams_http') do |file_name|
::File.open(file_name, 'wb') { |io| response.read_body { |chunk| io.write(chunk) } }
# Return a read stream
- result = ::File.open(file_name, 'rb', &block)
+ result = ::File.open(file_name, "rb") { |io| streams.reader(io, &block) }
end
end
end
result
end