Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 16f36b6171
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (17 sloc) 0.446 kb
module ActionController
class RewindableInput
def initialize(app)
@app = app
end
def call(env)
begin
env['rack.input'].rewind
rescue NoMethodError, Errno::ESPIPE
# Handles exceptions raised by input streams that cannot be rewound
# such as when using plain CGI under Apache
env['rack.input'] = StringIO.new(env['rack.input'].read)
end
@app.call(env)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.