From 6dce7626908299c6348d26ae4c9ce7f4ce783d6a Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Tue, 25 Aug 2009 18:04:46 -0700 Subject: [PATCH] Read out the timestamp of the POST response header because the modified time is not part of the response data. --- services/sync/modules/engines.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/services/sync/modules/engines.js b/services/sync/modules/engines.js index 1a56011e0342..894a75ef02ec 100644 --- a/services/sync/modules/engines.js +++ b/services/sync/modules/engines.js @@ -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(); });