|
|
@ -62,6 +62,15 @@ func (api objectAPIHandlers) PutBucketVersioningHandler(w http.ResponseWriter, r |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if rcfg, _ := globalBucketObjectLockSys.Get(bucket); rcfg.LockEnabled && v.Suspended() { |
|
|
|
|
|
|
|
writeErrorResponse(ctx, w, APIError{ |
|
|
|
|
|
|
|
Code: "InvalidBucketState", |
|
|
|
|
|
|
|
Description: "An Object Lock configuration is present on this bucket, so the versioning state cannot be changed.", |
|
|
|
|
|
|
|
HTTPStatusCode: http.StatusConflict, |
|
|
|
|
|
|
|
}, r.URL, guessIsBrowserReq(r)) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
configData, err := xml.Marshal(v) |
|
|
|
configData, err := xml.Marshal(v) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r)) |
|
|
|
writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL, guessIsBrowserReq(r)) |
|
|
|