Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

engine.io-client

Package Overview
Dependencies
Maintainers
2
Versions
159
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engine.io-client - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

10

History.md
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 @@ ===================

32

lib/transports/polling-xhr.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc