diff options
author | Hongli Lai (Phusion) <hongli@phusion.nl> | 2009-06-17 17:30:38 -0500 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2009-10-18 21:36:42 +0200 |
commit | 5c475a0837b9fc8014a5e73bddd1981efcad9100 (patch) | |
tree | 9437e2b1dfcc6f4cc5f3ce693f1dbce645685133 | |
parent | 5c971306048cfa62d3fbce091437bedef0b616ec (diff) | |
download | rack-5c475a0837b9fc8014a5e73bddd1981efcad9100.tar.gz |
Enforce binary encoding in RewindableInput; fixes Ruby 1.9 issues.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
-rw-r--r-- | lib/rack/rewindable_input.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rack/rewindable_input.rb b/lib/rack/rewindable_input.rb index 9e9b21ff..accd96be 100644 --- a/lib/rack/rewindable_input.rb +++ b/lib/rack/rewindable_input.rb @@ -72,6 +72,8 @@ module Rack # access it because we have the file handle open. @rewindable_io = Tempfile.new('RackRewindableInput') @rewindable_io.chmod(0000) + @rewindable_io.set_encoding(Encoding::BINARY) if @rewindable_io.respond_to?(:set_encoding) + @rewindable_io.binmode if filesystem_has_posix_semantics? @rewindable_io.unlink @unlinked = true |