Browse Source

fix the multipart get part ETag

pull/7481/head
chrislu 2 weeks ago
parent
commit
a8a25cc353
  1. 4
      weed/s3api/s3api_object_handlers.go

4
weed/s3api/s3api_object_handlers.go

@ -1715,11 +1715,13 @@ func (s3a *S3ApiServer) setResponseHeaders(w http.ResponseWriter, entry *filer_p
w.Header().Set("Content-Length", strconv.FormatInt(totalSize, 10))
w.Header().Set("Accept-Ranges", "bytes")
// Set ETag
// Set ETag (but don't overwrite if already set, e.g., for part-specific GET requests)
if w.Header().Get("ETag") == "" {
etag := filer.ETag(entry)
if etag != "" {
w.Header().Set("ETag", "\""+etag+"\"")
}
}
// Set Last-Modified in RFC1123 format
if entry.Attributes != nil {

Loading…
Cancel
Save