WebDAV file sync overhaul for 5.0

Also:

- Remove last-sync-time mechanism for both WebDAV and ZFS, since it can
  be determined by storage properties (mtime/md5) in data sync
- Add option to include synced storage properties in item toJSON()
  instead of local file properties
- Set "Fake-Server-Match" header in setHTTPResponse() test support
  function, which can be used for request count assertions -- see
  resetRequestCount() and assertRequestCount() in webdavTest.js
- Allow string (e.g., 'to_download') instead of constant in
  Zotero.Sync.Data.Local.setSyncState()
- Misc storage tweaks
This commit is contained in:
Dan Stillman 2015-12-23 04:52:09 -05:00
parent 6844deba60
commit c5a9987f37
32 changed files with 3182 additions and 2789 deletions

View file

@ -724,8 +724,14 @@ function setHTTPResponse(server, baseURL, response, responses) {
responseArray[1]["Content-Type"] = "text/plain";
responseArray[2] = response.text || "";
}
if (!response.headers) {
response.headers = {};
}
response.headers["Fake-Server-Match"] = 1;
for (let i in response.headers) {
responseArray[1][i] = response.headers[i];
}
server.respondWith(response.method, baseURL + response.url, responseArray);
}