Skip to content

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

Merged
dblock merged 4 commits intoruby-grape:masterfrom
Deckchair:master
Mar 2, 2013
Merged

Change order of Rack middleware execution. Fixes issues experienced with JSONP and Grape Entities#352
dblock merged 4 commits intoruby-grape:masterfrom
Deckchair:master

Conversation

@deckchairhq
Copy link
Copy Markdown
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
Copy Markdown
Member

dblock commented Mar 1, 2013

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

@deckchairhq
Copy link
Copy Markdown
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
Copy Markdown
Member

dblock commented Mar 1, 2013

Yes, that would be nice, thank you.

@deckchairhq
Copy link
Copy Markdown
Contributor Author

Added a quick link to CORS too...

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

Anything else?

@deckchairhq
Copy link
Copy Markdown
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
Copy Markdown
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