You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
http-browserify accepts a 'responseType' parameter to set the XHR response type. However, in Firefox 31 at least, the logic to set the response type always fails because it is set before xhr.open() is called.
According to the XHR spec (http://xhr.spec.whatwg.org/#the-responsetype-attribute) and
https://bugzilla.mozilla.org/show_bug.cgi?id=707484 it is legal to set the responseType attribute
before opening the request. However, this doesn't work with current versions of Firefox and results
in an exception.
Work around this issue by setting the xhr.responseType attribute only
after opening the request.
Also if the caller explicitly specifies a desired response type, report
an error instead of silently returning an unexpected data type if the
xhr.responseType assignment fails.
Fixesbrowserify#65
Set the response type for XHR requests to 'arraybuffer' to ensure
correct delivery of binary data when making HTTP requests in
the browser.
This required working around an issue with XMLHttpRequest.responseType
described in browserify/http-browserify#65
http-browserify accepts a 'responseType' parameter to set the XHR response type. However, in Firefox 31 at least, the logic to set the response type always fails because it is set before xhr.open() is called.
The call to set 'xhr.responseType = params.responseType' fails with 'An attempt was made to use an object that is not, or is no longer, usable' ala. http://stackoverflow.com/questions/13216903/get-binary-data-with-xmlhttprequest-in-a-firefox-extension
The text was updated successfully, but these errors were encountered: