aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/auth_credentials_subscribe.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-07-18 01:39:23 -0700
committerchrislu <chris.lu@gmail.com>2025-07-18 01:39:23 -0700
commitbcc7a74a25d21ad1585d1df0206cb8251e0df06c (patch)
tree6fec86e1b178b8db706d605a6579e33afb222926 /weed/s3api/auth_credentials_subscribe.go
parent0d4eeb67be4eee895f28d3967365984e52c2ad27 (diff)
downloadseaweedfs-bcc7a74a25d21ad1585d1df0206cb8251e0df06c.tar.xz
seaweedfs-bcc7a74a25d21ad1585d1df0206cb8251e0df06c.zip
use fields instead of xml
Diffstat (limited to 'weed/s3api/auth_credentials_subscribe.go')
-rw-r--r--weed/s3api/auth_credentials_subscribe.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/weed/s3api/auth_credentials_subscribe.go b/weed/s3api/auth_credentials_subscribe.go
index 52e548a68..4d6b0fd19 100644
--- a/weed/s3api/auth_credentials_subscribe.go
+++ b/weed/s3api/auth_credentials_subscribe.go
@@ -1,7 +1,6 @@
package s3api
import (
- "encoding/xml"
"time"
"github.com/seaweedfs/seaweedfs/weed/filer"
@@ -131,14 +130,9 @@ func (s3a *S3ApiServer) updateBucketConfigCacheFromEntry(entry *filer_pb.Entry)
config.Owner = string(owner)
}
// Parse Object Lock configuration if present
- if objectLockConfigXML, exists := entry.Extended[s3_constants.ExtObjectLockConfigKey]; exists {
- var objectLockConfig ObjectLockConfiguration
- if err := xml.Unmarshal(objectLockConfigXML, &objectLockConfig); err != nil {
- glog.Errorf("updateBucketConfigCacheFromEntry: failed to parse Object Lock configuration for bucket %s: %v", bucket, err)
- } else {
- config.ObjectLockConfig = &objectLockConfig
- glog.V(2).Infof("updateBucketConfigCacheFromEntry: cached Object Lock configuration for bucket %s", bucket)
- }
+ if objectLockConfig, found := LoadObjectLockConfigurationFromExtended(entry); found {
+ config.ObjectLockConfig = objectLockConfig
+ glog.V(2).Infof("updateBucketConfigCacheFromEntry: cached Object Lock configuration for bucket %s", bucket)
}
}