Skip to content

Commit

Permalink
[chore] Release 2.1.1 (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Mar 22, 2017
1 parent 56bf176 commit 4c021d3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
5 changes: 5 additions & 0 deletions History.md
@@ -1,4 +1,9 @@

2.1.1 / 2017-03-22
===================

* [chore] Bump engine.io-parser to version 2.0.2 (#555)

2.1.0 / 2017-03-11
===================

Expand Down
16 changes: 14 additions & 2 deletions engine.io.js
Expand Up @@ -1529,7 +1529,7 @@ return /******/ (function(modules) { // webpackBootstrap
};

// decode payload
parser.decodePayload(data, this.socket.binaryType, callback);
parser.decodePayload(data, this.socket.binaryType, this.supportsBinary, callback);

// if an event did not trigger closing
if ('closed' !== this.readyState) {
Expand Down Expand Up @@ -2166,7 +2166,7 @@ return /******/ (function(modules) { // webpackBootstrap
* @api public
*/

exports.decodePayload = function (data, binaryType, callback) {
exports.decodePayload = function (data, binaryType, utf8decode, callback) {
if (typeof data !== 'string') {
return exports.decodePayloadAsBinary(data, binaryType, callback);
}
Expand All @@ -2176,12 +2176,24 @@ return /******/ (function(modules) { // webpackBootstrap
binaryType = null;
}

if (typeof utf8decode === 'function') {
callback = utf8decode;
utf8decode = null;
}

var packet;
if (data === '') {
// parser error - ignoring payload
return callback(err, 0, 1);
}

if (utf8decode) {
data = tryDecode(data);
if (data === false) {
return callback(err, 0, 1);
}
}

var length = '', n, msg;

for (var i = 0, l = data.length; i < l; i++) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -2,7 +2,7 @@
"name": "engine.io-client",
"description": "Client for the realtime Engine",
"license": "MIT",
"version": "2.1.0",
"version": "2.1.1",
"homepage": "https://github.com/socketio/engine.io-client",
"contributors": [
{
Expand Down Expand Up @@ -45,7 +45,7 @@
"concat-stream": "1.5.2",
"del": "2.2.0",
"derequire": "1.2.0",
"engine.io": "2.1.0",
"engine.io": "2.1.1",
"eslint-config-standard": "4.4.0",
"eslint-plugin-standard": "1.3.1",
"expect.js": "0.2.0",
Expand Down

0 comments on commit 4c021d3

Please sign in to comment.