diff --git a/lib/transports/xhr-multipart.js b/lib/transports/xhr-multipart.js index d75ca133..69dbf92b 100644 --- a/lib/transports/xhr-multipart.js +++ b/lib/transports/xhr-multipart.js @@ -5,7 +5,6 @@ io.Transport['xhr-multipart'] = io.Transport.XHR.extend({ connect: function(){ var self = this; this._xhr = this._request('', 'GET'); - this._xhr.multipart = true; this._xhr.onreadystatechange = function(){ if (self._xhr.readyState == 3) self._onData(self._xhr.responseText); else if (self._xhr.status == 200 && self._xhr.readyState == 4) self.connect(); diff --git a/lib/transports/xhr.js b/lib/transports/xhr.js index f114782d..a5b1d032 100644 --- a/lib/transports/xhr.js +++ b/lib/transports/xhr.js @@ -23,8 +23,9 @@ this._onDisconnect(); }, - _request: function(url, method){ + _request: function(url, method, multipart){ var req = request(); + if (multipart) req.multipart = true; req.open(method || 'GET', this._prepareUrl() + (url ? '/' + url : '')); if (method == 'POST'){ req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=utf-8');