engine.io-client
Advanced tools
Comparing version 3.3.2 to 3.4.0
@@ -69,2 +69,3 @@ /** | ||
this.enablesXDR = !!opts.enablesXDR; | ||
this.withCredentials = false !== opts.withCredentials; | ||
this.timestampParam = opts.timestampParam || 't'; | ||
@@ -187,2 +188,3 @@ this.timestampRequests = opts.timestampRequests; | ||
enablesXDR: options.enablesXDR || this.enablesXDR, | ||
withCredentials: options.withCredentials || this.withCredentials, | ||
timestampRequests: options.timestampRequests || this.timestampRequests, | ||
@@ -189,0 +191,0 @@ timestampParam: options.timestampParam || this.timestampParam, |
@@ -33,2 +33,3 @@ /** | ||
this.enablesXDR = opts.enablesXDR; | ||
this.withCredentials = opts.withCredentials; | ||
@@ -35,0 +36,0 @@ // SSL options for Node.js client |
@@ -80,2 +80,3 @@ /* global attachEvent */ | ||
opts.enablesXDR = this.enablesXDR; | ||
opts.withCredentials = this.withCredentials; | ||
@@ -154,2 +155,3 @@ // SSL options for Node.js client | ||
this.enablesXDR = opts.enablesXDR; | ||
this.withCredentials = opts.withCredentials; | ||
this.requestTimeout = opts.requestTimeout; | ||
@@ -229,3 +231,3 @@ | ||
if ('withCredentials' in xhr) { | ||
xhr.withCredentials = true; | ||
xhr.withCredentials = this.withCredentials; | ||
} | ||
@@ -249,3 +251,3 @@ | ||
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'; | ||
@@ -262,3 +264,3 @@ } | ||
setTimeout(function () { | ||
self.onError(xhr.status); | ||
self.onError(typeof xhr.status === 'number' ? xhr.status : 0); | ||
}, 0); | ||
@@ -363,3 +365,3 @@ } | ||
} 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; | ||
@@ -366,0 +368,0 @@ } else { |
@@ -18,3 +18,5 @@ /** | ||
BrowserWebSocket = self.WebSocket || self.MozWebSocket; | ||
} else { | ||
} | ||
if (typeof window === 'undefined') { | ||
try { | ||
@@ -21,0 +23,0 @@ NodeWebSocket = require('ws'); |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "3.3.2", | ||
"version": "3.4.0", | ||
"main": "lib/index.js", | ||
@@ -30,4 +30,4 @@ "homepage": "https://github.com/socketio/engine.io-client", | ||
"component-inherit": "0.0.3", | ||
"debug": "~3.1.0", | ||
"engine.io-parser": "~2.1.1", | ||
"debug": "~4.1.0", | ||
"engine.io-parser": "~2.2.0", | ||
"has-cors": "1.1.0", | ||
@@ -50,3 +50,3 @@ "indexof": "0.0.1", | ||
"derequire": "^2.0.6", | ||
"engine.io": "3.3.1", | ||
"engine.io": "3.4.0", | ||
"eslint-config-standard": "4.4.0", | ||
@@ -53,0 +53,0 @@ "eslint-plugin-standard": "1.3.1", |
@@ -199,2 +199,3 @@ | ||
- `enablesXDR` (`Boolean`): enables XDomainRequest for IE8 to avoid loading bar flashing with click sound. default to `false` because XDomainRequest has a flaw of not sending cookie. | ||
- `withCredentials` (`Boolean`): defaults to `true`, whether to include credentials (cookies, authorization headers, TLS client certificates, etc.) with cross-origin XHR polling requests. | ||
- `timestampRequests` (`Boolean`): whether to add the timestamp with each | ||
@@ -201,0 +202,0 @@ transport request. Note: polling requests are always stamped unless this |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179125
5725
301
+ Addedbase64-arraybuffer@0.1.4(transitive)
+ Addeddebug@4.1.1(transitive)
+ Addedengine.io-parser@2.2.1(transitive)
+ Addedms@2.1.3(transitive)
- Removedbase64-arraybuffer@0.1.5(transitive)
- Removeddebug@3.1.0(transitive)
- Removedengine.io-parser@2.1.3(transitive)
- Removedms@2.0.0(transitive)
Updateddebug@~4.1.0
Updatedengine.io-parser@~2.2.0