mirror of
https://github.com/owenlejeune/AirHockey.git
synced 2025-11-18 13:30:55 -05:00
npm modules updated
This commit is contained in:
14
node_modules/engine.io-client/lib/transports/polling-xhr.js
generated
vendored
14
node_modules/engine.io-client/lib/transports/polling-xhr.js
generated
vendored
@@ -220,10 +220,6 @@ Request.prototype.create = function () {
|
||||
xhr.setRequestHeader('Accept', '*/*');
|
||||
} catch (e) {}
|
||||
|
||||
if (this.supportsBinary) {
|
||||
xhr.responseType = 'arraybuffer';
|
||||
}
|
||||
|
||||
// ie6 check
|
||||
if ('withCredentials' in xhr) {
|
||||
xhr.withCredentials = true;
|
||||
@@ -245,8 +241,8 @@ Request.prototype.create = function () {
|
||||
if (xhr.readyState === 2) {
|
||||
try {
|
||||
var contentType = xhr.getResponseHeader('Content-Type');
|
||||
if (contentType !== 'application/octet-stream') {
|
||||
xhr.responseType = 'text';
|
||||
if (self.supportsBinary && contentType === 'application/octet-stream') {
|
||||
xhr.responseType = 'arraybuffer';
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
@@ -358,11 +354,7 @@ Request.prototype.onLoad = function () {
|
||||
contentType = this.xhr.getResponseHeader('Content-Type');
|
||||
} catch (e) {}
|
||||
if (contentType === 'application/octet-stream') {
|
||||
if (this.xhr.responseType === 'arraybuffer') {
|
||||
data = this.xhr.response || this.xhr.responseText;
|
||||
} else {
|
||||
data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
|
||||
}
|
||||
data = this.xhr.response || this.xhr.responseText;
|
||||
} else {
|
||||
data = this.xhr.responseText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user