aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_bucket_handlers_object_lock_config.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/s3api/s3api_bucket_handlers_object_lock_config.go')
-rw-r--r--weed/s3api/s3api_bucket_handlers_object_lock_config.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/weed/s3api/s3api_bucket_handlers_object_lock_config.go b/weed/s3api/s3api_bucket_handlers_object_lock_config.go
index c779f80d7..23b52648e 100644
--- a/weed/s3api/s3api_bucket_handlers_object_lock_config.go
+++ b/weed/s3api/s3api_bucket_handlers_object_lock_config.go
@@ -86,6 +86,9 @@ func (s3a *S3ApiServer) GetObjectLockConfigurationHandler(w http.ResponseWriter,
// Check if we have cached Object Lock configuration
if bucketConfig.ObjectLockConfig != nil {
+ // Set namespace for S3 compatibility
+ bucketConfig.ObjectLockConfig.XMLNS = s3_constants.S3Namespace
+
// Use cached configuration and marshal it to XML for response
marshaledXML, err := xml.Marshal(bucketConfig.ObjectLockConfig)
if err != nil {
@@ -139,6 +142,9 @@ func (s3a *S3ApiServer) GetObjectLockConfigurationHandler(w http.ResponseWriter,
// not just ObjectLockConfig, before resetting the TTL
s3a.updateBucketConfigCacheFromEntry(freshEntry)
+ // Set namespace for S3 compatibility
+ objectLockConfig.XMLNS = s3_constants.S3Namespace
+
// Marshal and return the configuration
marshaledXML, err := xml.Marshal(objectLockConfig)
if err != nil {