mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
keep bucket metadata fields to be consistent (#9660)
added bonus reload bucket metadata always after a successful MakeBucket, current we were only doing it with object locking enabled.
This commit is contained in:
@@ -538,9 +538,8 @@ func (api objectAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Req
|
||||
return
|
||||
}
|
||||
|
||||
if objectLockEnabled {
|
||||
globalNotificationSys.LoadBucketMetadata(GlobalContext, bucket)
|
||||
}
|
||||
// Load updated bucket metadata into memory.
|
||||
globalNotificationSys.LoadBucketMetadata(GlobalContext, bucket)
|
||||
|
||||
// Make sure to add Location information here only for bucket
|
||||
w.Header().Set(xhttp.Location,
|
||||
@@ -572,9 +571,8 @@ func (api objectAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Req
|
||||
return
|
||||
}
|
||||
|
||||
if objectLockEnabled {
|
||||
globalNotificationSys.LoadBucketMetadata(GlobalContext, bucket)
|
||||
}
|
||||
// Load updated bucket metadata into memory.
|
||||
globalNotificationSys.LoadBucketMetadata(GlobalContext, bucket)
|
||||
|
||||
// Make sure to add Location information here only for bucket
|
||||
w.Header().Set(xhttp.Location, path.Clean(r.URL.Path)) // Clean any trailing slashes.
|
||||
|
||||
Reference in New Issue
Block a user