Skip to content

XMLHttpRequest: return the parsed json response on its first read - #523

Draft
wesgarland wants to merge 1 commit into
mainfrom
wes/fix/xhr-json-response
Draft

wesgarland wants to merge 1 commit into
mainfrom
wes/fix/xhr-json-response

Conversation

@wesgarland

Copy link
Copy Markdown
Collaborator

get response() with responseType = 'json' parsed and cached the body, then fell through to the "unsupported responseType" throw: the first read threw, later reads returned the cached object. Adds the missing return.

Found through dcp-client, whose jnu.connect() reads a json response once and so failed under PythonMonkey.

tests/python/test_xhr.py gains a responseType = 'json' case: it fails on 1.5.1 and passes with this change.

get response() parsed and cached a json response, then fell through to the unsupported-responseType
throw; only later reads, served from the cache, returned it.

This branch has not been deployed

No deployments
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.

1 participant