|
|
@ -86,6 +86,9 @@ func (s3a *S3ApiServer) GetObjectLockConfigurationHandler(w http.ResponseWriter, |
|
|
|
|
|
|
|
|
// Check if we have cached Object Lock configuration
|
|
|
// Check if we have cached Object Lock configuration
|
|
|
if bucketConfig.ObjectLockConfig != nil { |
|
|
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
|
|
|
// Use cached configuration and marshal it to XML for response
|
|
|
marshaledXML, err := xml.Marshal(bucketConfig.ObjectLockConfig) |
|
|
marshaledXML, err := xml.Marshal(bucketConfig.ObjectLockConfig) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
@ -139,6 +142,9 @@ func (s3a *S3ApiServer) GetObjectLockConfigurationHandler(w http.ResponseWriter, |
|
|
// not just ObjectLockConfig, before resetting the TTL
|
|
|
// not just ObjectLockConfig, before resetting the TTL
|
|
|
s3a.updateBucketConfigCacheFromEntry(freshEntry) |
|
|
s3a.updateBucketConfigCacheFromEntry(freshEntry) |
|
|
|
|
|
|
|
|
|
|
|
// Set namespace for S3 compatibility
|
|
|
|
|
|
objectLockConfig.XMLNS = s3_constants.S3Namespace |
|
|
|
|
|
|
|
|
// Marshal and return the configuration
|
|
|
// Marshal and return the configuration
|
|
|
marshaledXML, err := xml.Marshal(objectLockConfig) |
|
|
marshaledXML, err := xml.Marshal(objectLockConfig) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
|