Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Enforce binary encoding in RewindableInput; fixes Ruby 1.9 issues.

Signed-off-by: Joshua Peek <>
  • Loading branch information...
commit 6df2248be0b323124cb491fa2f89b6b82f539f32 1 parent 07c1814
Hongli Lai FooBarWidget authored josh committed
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/rack/rewindable_input.rb
2  lib/rack/rewindable_input.rb
@@ -72,6 +72,8 @@ def make_rewindable
# access it because we have the file handle open.
@rewindable_io ='RackRewindableInput')
+ @rewindable_io.set_encoding(Encoding::BINARY) if @rewindable_io.respond_to?(:set_encoding)
+ @rewindable_io.binmode
if filesystem_has_posix_semantics?
@unlinked = true
Please sign in to comment.
Something went wrong with that request. Please try again.