Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Enforce binary encoding in RewindableInput; fixes Ruby 1.9 issues.

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
commit 6df2248be0b323124cb491fa2f89b6b82f539f32 1 parent 07c1814
Hongli Lai FooBarWidget authored josh committed

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. +2 0  lib/rack/rewindable_input.rb
2  lib/rack/rewindable_input.rb
@@ -72,6 +72,8 @@ def make_rewindable
72 72 # access it because we have the file handle open.
73 73 @rewindable_io = Tempfile.new('RackRewindableInput')
74 74 @rewindable_io.chmod(0000)
  75 + @rewindable_io.set_encoding(Encoding::BINARY) if @rewindable_io.respond_to?(:set_encoding)
  76 + @rewindable_io.binmode
75 77 if filesystem_has_posix_semantics?
76 78 @rewindable_io.unlink
77 79 @unlinked = true

0 comments on commit 6df2248

Please sign in to comment.
Something went wrong with that request. Please try again.