Send multipart=true before open

This commit is contained in:
Guillermo Rauch
2010-03-16 21:17:14 -07:00
parent 0757eb0ed8
commit 2ea11161fa
2 changed files with 2 additions and 2 deletions

View File

@@ -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();

View File

@@ -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');