engine.io-client
Advanced tools
Comparing version 3.0.0 to 3.1.0
3.1.0 / 2017-04-28 | ||
=================== | ||
* [chore] Bump engine.io-parser to version 2.1.1 (#566) | ||
* [chore] Pin debug to version 2.6.4 (#567) | ||
* [chore] Bump engine.io-parser to version 2.1.0 (#565) | ||
* [chore] Bump ws to version 2.3.1 (#564) | ||
* [chore] Bump debug to version 2.6.4 (#563) | ||
* [refactor] Set responseType based on 'Content-Type' header (#562) | ||
3.0.0 / 2017-04-06 | ||
@@ -3,0 +13,0 @@ =================== |
@@ -208,7 +208,2 @@ /** | ||
} catch (e) {} | ||
if (this.supportsBinary) { | ||
// This has to be done after open because Firefox is stupid | ||
// http://stackoverflow.com/questions/13216903/get-binary-data-with-xmlhttprequest-in-a-firefox-extension | ||
xhr.responseType = 'arraybuffer'; | ||
} | ||
@@ -247,2 +242,11 @@ if ('POST' === this.method) { | ||
xhr.onreadystatechange = function () { | ||
if (xhr.readyState === 2) { | ||
var contentType; | ||
try { | ||
contentType = xhr.getResponseHeader('Content-Type'); | ||
} catch (e) {} | ||
if (contentType === 'application/octet-stream') { | ||
xhr.responseType = 'arraybuffer'; | ||
} | ||
} | ||
if (4 !== xhr.readyState) return; | ||
@@ -353,3 +357,3 @@ if (200 === xhr.status || 1223 === xhr.status) { | ||
try { | ||
contentType = this.xhr.getResponseHeader('Content-Type').split(';')[0]; | ||
contentType = this.xhr.getResponseHeader('Content-Type'); | ||
} catch (e) {} | ||
@@ -359,17 +363,3 @@ if (contentType === 'application/octet-stream') { | ||
} else { | ||
if (!this.supportsBinary) { | ||
data = this.xhr.responseText; | ||
} else { | ||
try { | ||
data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response)); | ||
} catch (e) { | ||
var ui8Arr = new Uint8Array(this.xhr.response); | ||
var dataArray = []; | ||
for (var idx = 0, length = ui8Arr.length; idx < length; idx++) { | ||
dataArray.push(ui8Arr[idx]); | ||
} | ||
data = String.fromCharCode.apply(null, dataArray); | ||
} | ||
} | ||
data = this.xhr.responseText; | ||
} | ||
@@ -376,0 +366,0 @@ } catch (e) { |
@@ -148,3 +148,3 @@ /** | ||
// decode payload | ||
parser.decodePayload(data, this.socket.binaryType, this.supportsBinary, callback); | ||
parser.decodePayload(data, this.socket.binaryType, callback); | ||
@@ -151,0 +151,0 @@ // if an event did not trigger closing |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"homepage": "https://github.com/socketio/engine.io-client", | ||
@@ -29,4 +29,4 @@ "contributors": [ | ||
"component-inherit": "0.0.3", | ||
"debug": "2.3.3", | ||
"engine.io-parser": "2.0.3", | ||
"debug": "2.6.4", | ||
"engine.io-parser": "~2.1.1", | ||
"has-cors": "1.1.0", | ||
@@ -37,3 +37,3 @@ "indexof": "0.0.1", | ||
"parseuri": "0.0.5", | ||
"ws": "2.2.3", | ||
"ws": "~2.3.1", | ||
"xmlhttprequest-ssl": "1.5.3", | ||
@@ -51,3 +51,3 @@ "yeast": "0.1.2" | ||
"derequire": "^2.0.6", | ||
"engine.io": "3.0.0", | ||
"engine.io": "3.1.0", | ||
"eslint-config-standard": "4.4.0", | ||
@@ -54,0 +54,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
195672
5690
+ Addedarraybuffer.slice@0.0.7(transitive)
+ Addedblob@0.0.5(transitive)
+ Addeddebug@2.6.4(transitive)
+ Addedengine.io-parser@2.1.3(transitive)
+ Addedhas-binary2@1.0.3(transitive)
+ Addedms@0.7.3(transitive)
+ Addedws@2.3.1(transitive)
- Removedarraybuffer.slice@0.0.6(transitive)
- Removedblob@0.0.4(transitive)
- Removeddebug@2.3.3(transitive)
- Removedengine.io-parser@2.0.3(transitive)
- Removedhas-binary2@1.0.1(transitive)
- Removedms@0.7.2(transitive)
- Removedws@2.2.3(transitive)
Updateddebug@2.6.4
Updatedengine.io-parser@~2.1.1
Updatedws@~2.3.1