No commit activity in last 3 years
No release in over 3 years
Params parser Rack middleware able to handle parsing errors
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.2.8
 Project Readme

Robust Params Parser by Infopark Infopark

Params parser Rack middleware able to handle parsing errors. Temporary workaround for rails/rails#7424

For Rails 3 only. As of Rails 4 this workaround is obsolete.

Installation

  # In your Gemfile
  gem 'robust_params_parser'

  # In your config/application.rb
  config.middleware.swap ActionDispatch::ParamsParser, ::RobustParamsParser, {}

Usage

Just make a POST with Content-Type 'application/json' and an invalid JSON as payload, which will result in a 400 status code and an empty body response.

Caveats

Only works if you're using MultiJson.

License

LGPG-3.0 License. Copyright 2013 Infopark AG. http://www.infopark.com