Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle non-hash body params. #391

Merged
merged 1 commit into from
Apr 23, 2013
Merged

Handle non-hash body params. #391

merged 1 commit into from
Apr 23, 2013

Conversation

paulnicholson
Copy link
Contributor

This is related to #347. When the body of the request is not a hash, do not modify the request's form_input since this breaks the Rack::Request#params method by allowing Rack::Request#POST to return nil.
https://github.com/rack/rack/blob/da7efac44c7c463fb39e82d40c4a23403db383de/lib/rack/request.rb#L227
https://github.com/rack/rack/blob/da7efac44c7c463fb39e82d40c4a23403db383de/lib/rack/request.rb#L201

When the body of the request is not a hash, do not modify the request's form_input since this breaks the Rack::Request#params method by allowing Rack::Request#POST to return nil.
https://github.com/rack/rack/blob/da7efac44c7c463fb39e82d40c4a23403db383de/lib/rack/request.rb#L227
https://github.com/rack/rack/blob/da7efac44c7c463fb39e82d40c4a23403db383de/lib/rack/request.rb#L201
@dblock
Copy link
Member

dblock commented Apr 23, 2013

Thanks for this.

dblock added a commit that referenced this pull request Apr 23, 2013
@dblock dblock merged commit 2b4ef1c into ruby-grape:master Apr 23, 2013
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.

2 participants