Skip to content

Commit 4c547a7

Browse files
[chore] Release 3.1.6
1 parent 9f54053 commit 4c547a7

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

engine.io.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,10 +1164,6 @@ return /******/ (function(modules) { // webpackBootstrap
11641164
xhr.setRequestHeader('Accept', '*/*');
11651165
} catch (e) {}
11661166

1167-
if (this.supportsBinary) {
1168-
xhr.responseType = 'arraybuffer';
1169-
}
1170-
11711167
// ie6 check
11721168
if ('withCredentials' in xhr) {
11731169
xhr.withCredentials = true;
@@ -1189,8 +1185,8 @@ return /******/ (function(modules) { // webpackBootstrap
11891185
if (xhr.readyState === 2) {
11901186
try {
11911187
var contentType = xhr.getResponseHeader('Content-Type');
1192-
if (contentType !== 'application/octet-stream') {
1193-
xhr.responseType = 'text';
1188+
if (self.supportsBinary && contentType === 'application/octet-stream') {
1189+
xhr.responseType = 'arraybuffer';
11941190
}
11951191
} catch (e) {}
11961192
}
@@ -1302,11 +1298,7 @@ return /******/ (function(modules) { // webpackBootstrap
13021298
contentType = this.xhr.getResponseHeader('Content-Type');
13031299
} catch (e) {}
13041300
if (contentType === 'application/octet-stream') {
1305-
if (this.xhr.responseType === 'arraybuffer') {
1306-
data = this.xhr.response || this.xhr.responseText;
1307-
} else {
1308-
data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
1309-
}
1301+
data = this.xhr.response || this.xhr.responseText;
13101302
} else {
13111303
data = this.xhr.responseText;
13121304
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "engine.io-client",
33
"description": "Client for the realtime Engine",
44
"license": "MIT",
5-
"version": "3.1.5",
5+
"version": "3.1.6",
66
"main": "lib/index.js",
77
"homepage": "https://github.com/socketio/engine.io-client",
88
"contributors": [

0 commit comments

Comments
 (0)