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
When using engine.io-client in node application/octet responses are ignored by the client as xmlhttprequest does not support the response field.
e.g
// line 465 on xmlhttprequest
response.on('data', function(chunk) {
// Make sure there's some data
if (chunk) {
self.responseText += chunk;
}
// Don't emit state changes if the connection has been aborted.
if (sendFlag) {
setState(self.LOADING);
}
});
the polling xhr transport is only looking for xhr.response which is never set:
//polling-xhr.js
Request.prototype.onLoad = function(){
var data;
try {
var contentType;
try {
contentType = this.xhr.getResponseHeader('Content-Type').split(';')[0];
} catch (e) {}
if (contentType === 'application/octet-stream') {
data = this.xhr.response;
} else {
if (!this.supportsBinary) {
data = this.xhr.responseText;
} else {
data = 'ok';
}
}
} catch (e) {
this.onError(e);
}
if (null != data) {
this.onData(data);
}
};
The data object is there always null on the response.
Would you consider moving to something like xhr2 instead as this does support binary payloads?
The text was updated successfully, but these errors were encountered:
When using engine.io-client in node application/octet responses are ignored by the client as xmlhttprequest does not support the response field.
e.g
// line 465 on xmlhttprequest
the polling xhr transport is only looking for xhr.response which is never set:
//polling-xhr.js
The data object is there always null on the response.
Would you consider moving to something like xhr2 instead as this does support binary payloads?
The text was updated successfully, but these errors were encountered: