Skip to content

Instantly share code, notes, and snippets.

@notch8-old
Created August 20, 2011 21:59
Show Gist options
  • Select an option

  • Save notch8-old/1159716 to your computer and use it in GitHub Desktop.

Select an option

Save notch8-old/1159716 to your computer and use it in GitHub Desktop.
def scrub(env)
rack_input = env["rack.input"].read
params = Rack::Utils.parse_query(rack_input, "&")
raise params.inspect
return false if params.has_key?("utf8") && params["utf8"] != "✓"
return true
ensure
env["rack.input"].rewind
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment