Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

Fix missing VersionConfiguration node in get-bucket-versioning response (#5162)

Konstantin Lebedev4f6172f3699c
diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go
index c1bb815a9b..6ae6011f2a 100644
--- a/weed/s3api/s3api_bucket_handlers.go
+++ b/weed/s3api/s3api_bucket_handlers.go
@@ -545,8 +545,9 @@ func (s3a *S3ApiServer) GetBucketVersioningHandler(w http.ResponseWriter, r *htt
return
}
- result := &s3.VersioningConfiguration{}
- result.SetStatus(s3.BucketVersioningStatusSuspended)
-
- s3err.WriteAwsXMLResponse(w, r, http.StatusOK, result)
+ s3err.WriteAwsXMLResponse(w, r, http.StatusOK, &s3.PutBucketVersioningInput{
+ VersioningConfiguration: &s3.VersioningConfiguration{
+ Status: aws.String(s3.BucketVersioningStatusSuspended),
+ },
+ })
}