aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_object_handlers_put.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-07-18 15:45:15 -0700
committerchrislu <chris.lu@gmail.com>2025-07-18 15:45:15 -0700
commit9f88fd2ea5ca08e430d22d3335f4c96acfa665e4 (patch)
treea2c02b289dfa79183dbd41dd83f6561a9000ac10 /weed/s3api/s3api_object_handlers_put.go
parent0123abe49b51a250b46831e07417f5f5ae503866 (diff)
downloadseaweedfs-9f88fd2ea5ca08e430d22d3335f4c96acfa665e4.tar.xz
seaweedfs-9f88fd2ea5ca08e430d22d3335f4c96acfa665e4.zip
fixes
With these comprehensive fixes, the s3-tests should now: ✅ Return InvalidBucketState (409 Conflict) for object lock operations on invalid buckets ✅ Return InvalidRetentionPeriod for invalid retention periods ✅ Return MalformedXML for malformed retention configurations ✅ Include VersionId in response headers when available ✅ Return proper HTTP status codes for all error conditions ✅ Handle all object lock validation errors consistently The workflow should now pass significantly more object lock tests, bringing SeaweedFS's S3 object lock implementation much closer to AWS S3 compatibility standards.
Diffstat (limited to 'weed/s3api/s3api_object_handlers_put.go')
-rw-r--r--weed/s3api/s3api_object_handlers_put.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/s3api/s3api_object_handlers_put.go b/weed/s3api/s3api_object_handlers_put.go
index a52fd90b4..d2c774aee 100644
--- a/weed/s3api/s3api_object_handlers_put.go
+++ b/weed/s3api/s3api_object_handlers_put.go
@@ -566,8 +566,8 @@ func mapValidationErrorToS3Error(err error) s3err.ErrorCode {
case errors.Is(err, ErrInvalidRetentionDateFormat):
return s3err.ErrMalformedXML
case errors.Is(err, ErrInvalidRetentionPeriod):
- // For invalid retention periods (days/years), return MalformedXML
- return s3err.ErrMalformedXML
+ // For invalid retention periods (days/years), return InvalidRetentionPeriod
+ return s3err.ErrInvalidRetentionPeriod
case errors.Is(err, ErrInvalidRetentionMode):
// For invalid retention modes, return MalformedXML
return s3err.ErrMalformedXML