Browse Source

s3api: document Checksum attribute as not yet populated

Checksum is accepted in validation (so clients requesting it don't get
a 400 error, matching AWS behavior for objects without checksums) but
SeaweedFS does not yet store S3 checksums. Add a comment explaining
this and noting where to populate it when checksum storage is added.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pull/8504/head
Chris Lu 3 days ago
parent
commit
895868593f
  1. 5
      weed/s3api/s3api_object_handlers_attributes.go

5
weed/s3api/s3api_object_handlers_attributes.go

@ -231,6 +231,11 @@ func (s3a *S3ApiServer) GetObjectAttributesHandler(w http.ResponseWriter, r *htt
resp.StorageClass = storageClass resp.StorageClass = storageClass
} }
// Checksum: accepted in validation so clients don't get a 400, but SeaweedFS
// does not yet store S3 checksums (CRC32, CRC32C, SHA1, SHA256), so
// resp.Checksum is intentionally left nil. When checksum storage is added,
// populate resp.Checksum here.
if _, ok := requestedAttrs["ObjectSize"]; ok { if _, ok := requestedAttrs["ObjectSize"]; ok {
var size int64 var size int64
if entry.Attributes != nil { if entry.Attributes != nil {

Loading…
Cancel
Save