diff options
Diffstat (limited to 'bandwagon/content/scripts/rpc/net.js')
-rw-r--r-- | bandwagon/content/scripts/rpc/net.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bandwagon/content/scripts/rpc/net.js b/bandwagon/content/scripts/rpc/net.js index 82c712e..28c3340 100644 --- a/bandwagon/content/scripts/rpc/net.js +++ b/bandwagon/content/scripts/rpc/net.js @@ -117,9 +117,12 @@ Bandwagon.RPC.Net = function(Bandwagon, Components) // parse xml here instead, put in response var var xmlStr = rpcnetrequest.responseText; - // workaround for E4X bug/feature + // workaround for E4X bugs/features xmlStr = xmlStr.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, ""); // bug 336551 + //default xml namespace = 'http://addons.mozilla.org/'; + xmlStr = xmlStr.replace(/xmlns="http:\/\/addons.mozilla.org\/"/, ""); + response = new XML(xmlStr); //rpcnet._logger.debug("Bandwagon.RPC.Net.send.onreadystatechange: ' + rpcnet.id + ': XML representation: '" + response.toXMLString() + "'"); @@ -257,10 +260,16 @@ Bandwagon.RPC.Net.prototype.setMethod = function(method) { this._method = 'POST'; } - else + else if (method == 'DELETE') + { + this._method = 'DELETE'; + } + else { this._method = 'GET'; } + + this._method = method; } Bandwagon.RPC.Net.prototype.setCredentials = function(username, password) |