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

Fix JSON response parsing in IE #661

Merged
merged 1 commit into from
Jul 4, 2016

Conversation

rschamp
Copy link
Contributor

@rschamp rschamp commented Jul 3, 2016

Fixes #654

IE does not honor responseType: 'json', and will not parse responses as JSON unless json data is present in the request. For some reason this issue can also be solved by including a json attribute on the xhr request, but if that's present, url encoded form data is overwritten with the contents of the json. So just try to parse the response ourselves if it looks like it wasn't parsed.

See naugtur/xhr#123

Fixes scratchfoundation#654

IE does not honor responseType: 'json', and will not parse responses as JSON unless json data is present in the request. For some reason this issue can also be solved by including a `json` attribute on the xhr request, but if that's present, url encoded form data is overwritten with the contents of the json.  So just try to parse the response ourselves if it looks like it wasn't parsed.

See naugtur/xhr#123
@rschamp rschamp added this to the June 23 milestone Jul 3, 2016
@thisandagain thisandagain assigned rschamp and unassigned thisandagain Jul 3, 2016
@rschamp rschamp merged commit 11155c4 into scratchfoundation:release/2.2.10 Jul 4, 2016
@rschamp rschamp deleted the bugfix/654 branch July 4, 2016 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants