ETag format/handling

Feel free to move the topic to a more appropriate category.

Our webdav based sync client uses etags to detect changes/conflicts. We now have a customer reporting a sync conflict which should not happen as the file was not touched from anyone else (he says). Looking at the log file I see that the etag we get from the server is different from the one we saw the last time we indexed the file which indicates a change/conflict. What confuses me is the different format of the etag for that file:

  • last etag the client saw for that file: 6d0ba3cc9cfbdbb9c96de019fd618de9
  • etag from the GET request: 652419851b3da

From my experience (didn’t check the code) the shorter format 65... is used for folders only. Files always have the long format.

Can you confirm that the short format can also exist for files or is there a chance that the server confuses with the etags?

The transcript for a GET request:

2023-10-09 17:24:47,380 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.request - GET /remote.php/dav/files/myuser/myfile.docx HTTP/1.1
2023-10-09 17:24:47,380 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.request - Host: blabla
2023-10-09 17:24:47,380 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.request - Connection: Keep-Alive
2023-10-09 17:24:47,380 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.request - User-Agent: Mountain Duck/4.14.4.21440 (Windows 10/10.0.19045.0) (amd64)
2023-10-09 17:24:47,381 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.request - Cookie: __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; oc_sessionPassphrase=***
2023-10-09 17:24:47,381 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.request - Accept-Encoding: gzip,deflate
2023-10-09 17:24:47,381 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.request - Authorization: ********
...
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - HTTP/1.1 200 OK
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Server: nginx
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Date: Mon, 09 Oct 2023 15:24:47 GMT
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Content-Length: 105579
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Connection: keep-alive
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-SSO-WAT: You've just been SSOed
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Expires: Thu, 19 Nov 1981 08:52:00 GMT
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Cache-Control: no-store, no-cache, must-revalidate
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Pragma: no-cache
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Content-Security-Policy: upgrade-insecure-requests
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Last-Modified: Thu, 21 Sep 2023 13:40:41 GMT
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - ETag: "651fd35960837"
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-Request-Id: PFM7xmaKMqztLqxAH6Pv
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - OC-ETag: "651fd35960837"
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-Debug-Token: PFM7xmaKMqztLqxAH6Pv
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Content-Disposition: attachment; filename*=UTF-8''myfile.docx; filename="myfile.docx"
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-Content-Type-Options: nosniff
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-XSS-Protection: 1; mode=block
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-Download-Options: noopen
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-Permitted-Cross-Domain-Policies: none
2023-10-09 17:24:47,419 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-Frame-Options: SAMEORIGIN
2023-10-09 17:24:47,420 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Permissions-Policy: interest-cohort=()
2023-10-09 17:24:47,420 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Strict-Transport-Security: max-age=15768000; includeSubDomains; preload;
2023-10-09 17:24:47,420 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - Referrer-Policy: no-referrer
2023-10-09 17:24:47,420 [ahNmQwJC-transfer-2] INFO  ch.cyberduck.transcript.response - X-Robots-Tag: noindex, nofollow

Yves

If relevant, this is server version 26.0.8.