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

Change order of Rack middleware execution. Fixes issues experienced with JSONP and Grape Entities #352

Merged
merged 4 commits into from
Mar 2, 2013

Conversation

deckchairhq
Copy link
Contributor

Modified execution order of Rack middleware.
Added a test for JSONP.
Added a section to the README regarding JSONP and CORS.

Fixes issues encountered with Grape::Entity being processed by JSONP middleware before being processed by the Formatter middleware. See #345 .

May fix other content-type header issues and body formatting related issues when using external middlewares.

Related discussions:

#345
#346

@dblock
Copy link
Member

dblock commented Mar 1, 2013

I am down with merging this fix. I'd like you to update CHANGELOG, please.

@deckchairhq
Copy link
Contributor Author

I'll cleanup the test and update the CHANGELOG.

Would you like something in the Docs about JSONP - I recall you mentioned it in a prev. thread?

@dblock
Copy link
Member

dblock commented Mar 1, 2013

Yes, that would be nice, thank you.

@deckchairhq
Copy link
Contributor Author

Added a quick link to CORS too...

https://github.com/Deckchair/grape/commit/b7f08f2722e61fcfdeb9cadf7aa6d51b01aa2ba9

Anything else?

@deckchairhq
Copy link
Contributor Author

Updated the title/description of the pull request.

dblock added a commit that referenced this pull request Mar 2, 2013
Change order of Rack middleware execution. Fixes issues experienced with JSONP and Grape Entities
@dblock dblock merged commit e484e64 into ruby-grape:master Mar 2, 2013
@dblock
Copy link
Member

dblock commented Mar 2, 2013

Merged, thank you.

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