Skip to content

Commit 33e0ba4

Browse files
[chore] Release 3.2.1
1 parent 4349b64 commit 33e0ba4

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

engine.io.js

Lines changed: 2 additions & 8 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
}
@@ -1303,8 +1299,6 @@ return /******/ (function(modules) { // webpackBootstrap
13031299
} catch (e) {}
13041300
if (contentType === 'application/octet-stream') {
13051301
data = this.xhr.response || this.xhr.responseText;
1306-
} else if (this.xhr.responseType === 'arraybuffer') {
1307-
data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response));
13081302
} else {
13091303
data = this.xhr.responseText;
13101304
}

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.2.0",
5+
"version": "3.2.1",
66
"main": "lib/index.js",
77
"homepage": "https://github.com/socketio/engine.io-client",
88
"contributors": [

0 commit comments

Comments
 (0)