From 895868593f360907cd36a3d061af63059a31fe12 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 4 Mar 2026 11:08:22 -0800 Subject: [PATCH] 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 --- weed/s3api/s3api_object_handlers_attributes.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weed/s3api/s3api_object_handlers_attributes.go b/weed/s3api/s3api_object_handlers_attributes.go index 35857ce9d..1597c4428 100644 --- a/weed/s3api/s3api_object_handlers_attributes.go +++ b/weed/s3api/s3api_object_handlers_attributes.go @@ -231,6 +231,11 @@ func (s3a *S3ApiServer) GetObjectAttributesHandler(w http.ResponseWriter, r *htt 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 { var size int64 if entry.Attributes != nil {