Added custom log name
This commit is contained in:
2
node_modules/engine.io-client/lib/socket.js
generated
vendored
2
node_modules/engine.io-client/lib/socket.js
generated
vendored
@ -66,6 +66,7 @@ function Socket (uri, opts) {
|
||||
this.jsonp = false !== opts.jsonp;
|
||||
this.forceBase64 = !!opts.forceBase64;
|
||||
this.enablesXDR = !!opts.enablesXDR;
|
||||
this.withCredentials = false !== opts.withCredentials;
|
||||
this.timestampParam = opts.timestampParam || 't';
|
||||
this.timestampRequests = opts.timestampRequests;
|
||||
this.transports = opts.transports || ['polling', 'websocket'];
|
||||
@ -183,6 +184,7 @@ Socket.prototype.createTransport = function (name) {
|
||||
jsonp: options.jsonp || this.jsonp,
|
||||
forceBase64: options.forceBase64 || this.forceBase64,
|
||||
enablesXDR: options.enablesXDR || this.enablesXDR,
|
||||
withCredentials: options.withCredentials || this.withCredentials,
|
||||
timestampRequests: options.timestampRequests || this.timestampRequests,
|
||||
timestampParam: options.timestampParam || this.timestampParam,
|
||||
policyPort: options.policyPort || this.policyPort,
|
||||
|
1
node_modules/engine.io-client/lib/transport.js
generated
vendored
1
node_modules/engine.io-client/lib/transport.js
generated
vendored
@ -30,6 +30,7 @@ function Transport (opts) {
|
||||
this.agent = opts.agent || false;
|
||||
this.socket = opts.socket;
|
||||
this.enablesXDR = opts.enablesXDR;
|
||||
this.withCredentials = opts.withCredentials;
|
||||
|
||||
// SSL options for Node.js client
|
||||
this.pfx = opts.pfx;
|
||||
|
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