diff --git a/lib/transports/polling-xhr.js b/lib/transports/polling-xhr.js index c7b7d9b3b..9988b021a 100755 --- a/lib/transports/polling-xhr.js +++ b/lib/transports/polling-xhr.js @@ -308,24 +308,8 @@ class Request extends Emitter { * @api private */ onLoad() { - let data; - try { - let contentType; - try { - contentType = this.xhr.getResponseHeader("Content-Type"); - } catch (e) {} - if ( - contentType === "application/octet-stream" || - contentType === "application/octet-stream; charset=UTF-8" - ) { - data = this.xhr.response || this.xhr.responseText; - } else { - data = this.xhr.responseText; - } - } catch (e) { - this.onError(e); - } - if (null != data) { + const data = this.xhr.responseText; + if (data !== null) { this.onData(data); } }