mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-11 00:08:51 +00:00
Monotone-Parent: 1ff8d61cb974903310a23626bb38b87a13f84358
Monotone-Revision: 3ed608f2d193596ff9ea26138010a888e87b0929 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-01-22T16:43:46 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -398,6 +398,7 @@ function uixDeleteSelectedContacts(sender) {
|
||||
http = createHTTPClient();
|
||||
http.open("POST", url, false /* not async */);
|
||||
http.send("");
|
||||
http.setRequestHeader("Content-Length", 0);
|
||||
if (http.status != 200) { /* request failed */
|
||||
failCount++;
|
||||
http = null;
|
||||
|
||||
@@ -1261,6 +1261,7 @@ function updateTaskStatus(event) {
|
||||
http.open("POST", url, false /* not async */);
|
||||
http.url = url;
|
||||
http.send("");
|
||||
http.setRequestHeader("Content-Length", 0);
|
||||
if (isHttpStatus204(http.status))
|
||||
refreshTasks();
|
||||
} else
|
||||
|
||||
@@ -334,7 +334,7 @@ function triggerAjaxRequest(url, callback, userdata, content, headers) {
|
||||
checkAjaxRequestsState();
|
||||
}
|
||||
}
|
||||
catch( e ) {
|
||||
catch (e) {
|
||||
activeAjaxRequests -= 1;
|
||||
checkAjaxRequestsState();
|
||||
log("AJAX Request, Caught Exception: " + e.name);
|
||||
@@ -342,9 +342,19 @@ function triggerAjaxRequest(url, callback, userdata, content, headers) {
|
||||
log(backtrace());
|
||||
}
|
||||
};
|
||||
var hasContentLength = false;
|
||||
if (headers) {
|
||||
for (var i in headers)
|
||||
for (var i in headers) {
|
||||
if (i.toLowerCase() == "content-length")
|
||||
hasContentLength = true;
|
||||
http.setRequestHeader(i, headers[i]);
|
||||
}
|
||||
}
|
||||
if (!hasContentLength) {
|
||||
var cLength = "0";
|
||||
if (content)
|
||||
cLength = "" + content.length;
|
||||
http.setRequestHeader("Content-Length", "" + cLength);
|
||||
}
|
||||
http.send(content);
|
||||
}
|
||||
@@ -1355,6 +1365,7 @@ function loadPreferences() {
|
||||
var http = createHTTPClient();
|
||||
http.open("GET", url, false);
|
||||
http.send("");
|
||||
|
||||
if (http.status == 200) {
|
||||
if (http.responseText.length > 0)
|
||||
userDefaults = http.responseText.evalJSON(true);
|
||||
|
||||
Reference in New Issue
Block a user