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

Document empty array parsing bug for #2079 #2080

Closed
wants to merge 1 commit into from

Conversation

PragTob
Copy link

@PragTob PragTob commented Jul 7, 2020

Was unsure where to put the specs, there's probably a better
place but here seemed fine for now.

Added some other array related specs for good measure.

Happy to also take a dig at resolving this bug if someone pointed me the right direction :)

For #2079

Was unsure where to put the specs, there's probably a better
place but here seemed fine for now.

Added some other array related specs for good measure.
@grape-bot
Copy link

1 Warning
⚠️ Unless you’re refactoring existing code, please update CHANGELOG.md.
1 Message
📖 We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!

Here's an example of a CHANGELOG.md entry:

* [#2080](https://github.com/ruby-grape/grape/pull/2080): Document empty array parsing bug for #2079 - [@PragTob](https://github.com/PragTob).

Generated by 🚫 danger

@dblock
Copy link
Member

dblock commented Jul 7, 2020

Happy to also take a dig at resolving this bug if someone pointed me the right direction :)

Please do. I would look at other array coercing fixes, e.g. #2054 for inspiration.

@PragTob
Copy link
Author

PragTob commented Jul 20, 2020

Moved to rack/rack#1696 as it seems to me it's rather in rack.

@PragTob PragTob closed this Jul 20, 2020
@richkettle
Copy link

richkettle commented Jul 30, 2020

Im also experiencing this issue. A fix that worked for me is to change

put "/api/url/foo/bar", params: params, headers: headers

to:

put "/api/url/foo/bar", params: params.to_json, headers: headers.merge("CONTENT_TYPE" => "application/json")

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.

None yet

4 participants