Created
November 8, 2009 07:59
-
-
Save macks/229162 to your computer and use it in GitHub Desktop.
Fix for Rack CGI handler's POST parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fix for Rack CGI handler's POST parameters | |
require 'rack/rewindable_input' | |
app = proc {|env| | |
env['rack.input'] = input = Rack::RewindableInput.new(env['rack.input']) | |
begin | |
YourApplication.call(env) | |
ensure | |
input.close | |
end | |
} | |
Rack::Handler::CGI.run app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment