mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
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:
parent
c3049133e5
commit
6dce762690
@ -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();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user