Read out the timestamp of the POST response header because the modified time is not part of the response data.

This commit is contained in:
Edward Lee 2009-08-25 18:04:46 -07:00
parent 8c87f37ff7
commit 8431f6ff7f

View File

@ -465,8 +465,12 @@ SyncEngine.prototype = {
let doUpload = Utils.bind2(this, function(desc) {
this._log.info("Uploading " + desc + " of " + outnum + " records");
up.post();
if (up.data.modified > this.lastSync)
this.lastSync = up.data.modified;
// Record the modified time of the upload
let modified = up._lastChannel.getResponseHeader("X-Weave-Timestamp");
if (modified > this.lastSync)
this.lastSync = modified;
up.clearRecords();
});