Skip to content

Ignore param parsing errors in MethodOverride#835

Merged
matthewd merged 1 commit intorack:masterfrom
greysteil:handle-param-parsing-errors-in-method-override
Jun 12, 2015
Merged

Ignore param parsing errors in MethodOverride#835
matthewd merged 1 commit intorack:masterfrom
greysteil:handle-param-parsing-errors-in-method-override

Conversation

@greysteil
Copy link
Contributor

If unparseable parameters are passed through Rack::MethodOverride it will bomb whilst looking for the _method parameter. Because Rack::MethodOverride is usually included low down in the stack this exception often goes uncaught, causing a 500.

This PR silently ignores parameter parsing errors that occur in Rack::MethodOverride. If the params are used later the same exception will be raised, but this will typically be much higher up the stack, and after any exception handling middleware.

See rails/rails#19632 for a discussion of this in Rails.

@greysteil
Copy link
Contributor Author

@spastorino - looks like you reviewed the last change to MethodOverride - any chance you could take a look over this?

@greysteil
Copy link
Contributor Author

@spastorino - would be great to get your opinion on whether this should be handled here or if the error should be caught in the framework.

@spastorino
Copy link
Contributor

Sorry, I'm right now with zero time to check this.
But we should take a look at all the open issues and PRs soon.

@greysteil
Copy link
Contributor Author

Thanks @spastorino. Would be great to get your opinion when you have a moment :octocat:

@greysteil
Copy link
Contributor Author

Hate to nag but I'd love an opinion on this vs. rails/rails#19632

matthewd added a commit that referenced this pull request Jun 12, 2015
…-method-override

Ignore param parsing errors in MethodOverride
@matthewd matthewd merged commit 618e71d into rack:master Jun 12, 2015
matthewd added a commit that referenced this pull request Jun 12, 2015
…-method-override

Ignore param parsing errors in MethodOverride
@greysteil
Copy link
Contributor Author

💖

@greysteil greysteil deleted the handle-param-parsing-errors-in-method-override branch June 12, 2015 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants