Don't try to parse javascript as JSON#239
Merged
jnunemaker merged 1 commit intojnunemaker:masterfrom Sep 27, 2013
jasonroelofs:fix_javascript_parsing
Merged
Don't try to parse javascript as JSON#239jnunemaker merged 1 commit intojnunemaker:masterfrom jasonroelofs:fix_javascript_parsing
jnunemaker merged 1 commit intojnunemaker:masterfrom
jasonroelofs:fix_javascript_parsing
Conversation
Trying to download files with the mime-type application/javascript (pure javascript files) ends up running through the JSON parser. Javascript code is not JSON, so this ends up throwing a MultiJSON::LoadError.
Owner
|
Downside is that it affects backwards compatibility quite a bit, but I see what you mean. Hummmmmmm... |
jnunemaker
pushed a commit
that referenced
this pull request
Sep 27, 2013
Don't try to parse javascript as JSON
Owner
|
Ok, I agree. Going with it. If I get chewed out by some upset user, so be it. :D This does feel more right to me. |
Contributor
Author
|
Awesome, thanks. I have a hard time seeing how anyone could be using this legitimately, unless they were then overwriting |
|
Apple's Itunes API uses text/javascript as the mime type of its json responses. I have little hope that anyone will get them to fix it however. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trying to download files with the mime-type application/javascript (pure
javascript files) ends up running through the JSON parser. As javascript
code is not JSON, so this ends up throwing a MultiJSON::LoadError.