Skip to content

Commit

Permalink
[chore] Release 3.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Mar 9, 2018
1 parent 9f54053 commit 4c547a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 3 additions & 11 deletions engine.io.js
Original file line number Diff line number Diff line change
Expand Up @@ -1164,10 +1164,6 @@ return /******/ (function(modules) { // webpackBootstrap
xhr.setRequestHeader('Accept', '*/*');
} catch (e) {}

if (this.supportsBinary) {
xhr.responseType = 'arraybuffer';
}

// ie6 check
if ('withCredentials' in xhr) {
xhr.withCredentials = true;
Expand All @@ -1189,8 +1185,8 @@ return /******/ (function(modules) { // webpackBootstrap
if (xhr.readyState === 2) {
try {
var contentType = xhr.getResponseHeader('Content-Type');
if (contentType !== 'application/octet-stream') {
xhr.responseType = 'text';
if (self.supportsBinary && contentType === 'application/octet-stream') {
xhr.responseType = 'arraybuffer';
}
} catch (e) {}
}
Expand Down Expand Up @@ -1302,11 +1298,7 @@ return /******/ (function(modules) { // webpackBootstrap
contentType = this.xhr.getResponseHeader('Content-Type');
} catch (e) {}
if (contentType === 'application/octet-stream') {
if (this.xhr.responseType === 'arraybuffer') {
data = this.xhr.response || this.xhr.responseText;
} else {
data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
}
data = this.xhr.response || this.xhr.responseText;
} else {
data = this.xhr.responseText;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "engine.io-client",
"description": "Client for the realtime Engine",
"license": "MIT",
"version": "3.1.5",
"version": "3.1.6",
"main": "lib/index.js",
"homepage": "https://github.com/socketio/engine.io-client",
"contributors": [
Expand Down

0 comments on commit 4c547a7

Please sign in to comment.