Skip to content

Instantly share code, notes, and snippets.

@macks
Created November 8, 2009 07:59
Show Gist options
  • Save macks/229162 to your computer and use it in GitHub Desktop.
Save macks/229162 to your computer and use it in GitHub Desktop.
Fix for Rack CGI handler's POST parameters
# 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