* webdav: store a real md5 for each uploaded chunk
Chunks written through the shared gateway uploader had no md5, so the
file ETag was built from empty digests: every overwrite of a multi-chunk
file kept the same ETag (If-None-Match answered 304 for new content) and
single-chunk files had no ETag at all. Ask the uploader for Content-MD5,
as mount and filer.copy already do.
* webdav: quote the ETag it serves
DAV:getetag and the ETag header must be entity-tags. A bare digest never
matches a client's quoted If-None-Match or If-Match in http.ServeContent,
and single-chunk files now carry a digest instead of webdav's quoted
fallback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* webdav: serve no filer ETag built from chunks without digests
Files written before chunks carried an md5 all hash to the md5 of empty
digests plus their chunk count, so unrelated files with as many chunks
share one tag and a conditional GET can answer 304 for changed content.
Leave the tag to webdav's modtime and size fallback for those.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* webdav: answer a PUT with the ETag of the content it committed
webdav.Handler stats the file before Close uploads the last chunk and
updates the entry, so every PUT answered the empty created entry's tag
and an If-Match with it failed against the stored file. Close now
records the committed entry's tag on the PUT outcome and the response
writer sends it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* webdav: serve no filer ETag for inline content without an md5
filer.ETag hashes only the chunk list, so every inline entry without
Attributes.Md5 gets the empty-list tag. Fall back to webdav's own tag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* webdav: upload the PUT test's chunk during Close
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* webdav: tag inline content without an md5 by its bytes
The modtime+size ETag webdav derives matches two equal-size contents stored
in one second, so a replace could answer 304. util.Md5 follows the
cluster's digest, which fips140=only keeps off MD5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* webdav: tag chunks stored without digests by their file ids
The modtime+size ETag webdav derives matches two equal-size files stored
in one second. A rewrite stores new chunks, so their file ids and
placement tell contents apart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>