Added custom log name
This commit is contained in:
10
node_modules/engine.io-client/lib/transports/polling-xhr.js
generated
vendored
10
node_modules/engine.io-client/lib/transports/polling-xhr.js
generated
vendored
@ -77,6 +77,7 @@ XHR.prototype.request = function (opts) {
|
||||
opts.agent = this.agent || false;
|
||||
opts.supportsBinary = this.supportsBinary;
|
||||
opts.enablesXDR = this.enablesXDR;
|
||||
opts.withCredentials = this.withCredentials;
|
||||
|
||||
// SSL options for Node.js client
|
||||
opts.pfx = this.pfx;
|
||||
@ -150,6 +151,7 @@ function Request (opts) {
|
||||
this.isBinary = opts.isBinary;
|
||||
this.supportsBinary = opts.supportsBinary;
|
||||
this.enablesXDR = opts.enablesXDR;
|
||||
this.withCredentials = opts.withCredentials;
|
||||
this.requestTimeout = opts.requestTimeout;
|
||||
|
||||
// SSL options for Node.js client
|
||||
@ -224,7 +226,7 @@ Request.prototype.create = function () {
|
||||
|
||||
// ie6 check
|
||||
if ('withCredentials' in xhr) {
|
||||
xhr.withCredentials = true;
|
||||
xhr.withCredentials = this.withCredentials;
|
||||
}
|
||||
|
||||
if (this.requestTimeout) {
|
||||
@ -243,7 +245,7 @@ Request.prototype.create = function () {
|
||||
if (xhr.readyState === 2) {
|
||||
try {
|
||||
var contentType = xhr.getResponseHeader('Content-Type');
|
||||
if (self.supportsBinary && contentType === 'application/octet-stream') {
|
||||
if (self.supportsBinary && contentType === 'application/octet-stream' || contentType === 'application/octet-stream; charset=UTF-8') {
|
||||
xhr.responseType = 'arraybuffer';
|
||||
}
|
||||
} catch (e) {}
|
||||
@ -255,7 +257,7 @@ Request.prototype.create = function () {
|
||||
// make sure the `error` event handler that's user-set
|
||||
// does not throw in the same tick and gets caught here
|
||||
setTimeout(function () {
|
||||
self.onError(xhr.status);
|
||||
self.onError(typeof xhr.status === 'number' ? xhr.status : 0);
|
||||
}, 0);
|
||||
}
|
||||
};
|
||||
@ -355,7 +357,7 @@ Request.prototype.onLoad = function () {
|
||||
try {
|
||||
contentType = this.xhr.getResponseHeader('Content-Type');
|
||||
} catch (e) {}
|
||||
if (contentType === 'application/octet-stream') {
|
||||
if (contentType === 'application/octet-stream' || contentType === 'application/octet-stream; charset=UTF-8') {
|
||||
data = this.xhr.response || this.xhr.responseText;
|
||||
} else {
|
||||
data = this.xhr.responseText;
|
||||
|
4
node_modules/engine.io-client/lib/transports/websocket.js
generated
vendored
4
node_modules/engine.io-client/lib/transports/websocket.js
generated
vendored
@ -15,7 +15,9 @@ if (typeof WebSocket !== 'undefined') {
|
||||
BrowserWebSocket = WebSocket;
|
||||
} else if (typeof self !== 'undefined') {
|
||||
BrowserWebSocket = self.WebSocket || self.MozWebSocket;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (typeof window === 'undefined') {
|
||||
try {
|
||||
NodeWebSocket = require('ws');
|
||||
} catch (e) { }
|
||||
|
Reference in New Issue
Block a user