mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00
Bug 894367 - Handle null postData properly in Http.jsm, r=Mossop.
This commit is contained in:
parent
2297263a26
commit
64c2e0ae05
@ -34,7 +34,7 @@ function httpRequest(aUrl, aOptions) {
|
||||
let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
|
||||
.createInstance(Ci.nsIXMLHttpRequest);
|
||||
xhr.mozBackgroundRequest = true; // no error dialogs
|
||||
let hasPostData = "postData" in aOptions;
|
||||
let hasPostData = "postData" in aOptions && aOptions.postData;
|
||||
xhr.open("method" in aOptions ? aOptions.method :
|
||||
(hasPostData ? "POST" : "GET"), aUrl);
|
||||
xhr.channel.loadFlags = Ci.nsIChannel.LOAD_ANONYMOUS | // don't send cookies
|
||||
|
Loading…
x
Reference in New Issue
Block a user