engine.io-client
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -223,2 +223,6 @@ /** | ||
if (this.supportsBinary) { | ||
xhr.responseType = 'arraybuffer'; | ||
} | ||
// ie6 check | ||
@@ -243,9 +247,8 @@ if ('withCredentials' in xhr) { | ||
if (xhr.readyState === 2) { | ||
var contentType; | ||
try { | ||
contentType = xhr.getResponseHeader('Content-Type'); | ||
var contentType = xhr.getResponseHeader('Content-Type'); | ||
if (contentType !== 'application/octet-stream') { | ||
xhr.responseType = 'text'; | ||
} | ||
} catch (e) {} | ||
if (contentType === 'application/octet-stream') { | ||
xhr.responseType = 'arraybuffer'; | ||
} | ||
} | ||
@@ -360,3 +363,7 @@ if (4 !== xhr.readyState) return; | ||
if (contentType === 'application/octet-stream') { | ||
data = this.xhr.response || this.xhr.responseText; | ||
if (this.xhr.responseType === 'arraybuffer') { | ||
data = this.xhr.response || this.xhr.responseText; | ||
} else { | ||
data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response)); | ||
} | ||
} else { | ||
@@ -363,0 +370,0 @@ data = this.xhr.responseText; |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"main": "lib/index.js", | ||
@@ -30,3 +30,3 @@ "homepage": "https://github.com/socketio/engine.io-client", | ||
"component-inherit": "0.0.3", | ||
"debug": "~2.6.9", | ||
"debug": "~3.1.0", | ||
"engine.io-parser": "~2.1.1", | ||
@@ -50,3 +50,3 @@ "has-cors": "1.1.0", | ||
"derequire": "^2.0.6", | ||
"engine.io": "3.1.4", | ||
"engine.io": "3.1.5", | ||
"eslint-config-standard": "4.4.0", | ||
@@ -53,0 +53,0 @@ "eslint-plugin-standard": "1.3.1", |
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
177530
5695
+ Addeddebug@3.1.0(transitive)
- Removeddebug@2.6.9(transitive)
Updateddebug@~3.1.0