Skip to content

Instantly share code, notes, and snippets.

@reactormonk
Created February 19, 2010 13:58
Show Gist options
  • Select an option

  • Save reactormonk/308716 to your computer and use it in GitHub Desktop.

Select an option

Save reactormonk/308716 to your computer and use it in GitHub Desktop.
app = proc do |env|
body = Hash[ENV].merge(env).map {|k,v| k.inspect + " => " + v.inspect }.join("\n")
response = Rack::Response.new([body], 200, { 'Content-Type' => 'text/plain', 'Content-Length' => body.size.to_s})
response.finish
end
run app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment