replication: enforce precondition for multipart (#19306)

This commit is contained in:
Poorna
2024-03-20 18:12:37 -07:00
committed by GitHub
parent 280526caf7
commit d990661d1f
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ func checkCopyObjectPreconditions(ctx context.Context, w http.ResponseWriter, r
// x-minio-source-etag
func checkPreconditionsPUT(ctx context.Context, w http.ResponseWriter, r *http.Request, objInfo ObjectInfo, opts ObjectOptions) bool {
// Return false for methods other than PUT.
if r.Method != http.MethodPut {
if r.Method != http.MethodPut && r.Method != http.MethodPost {
return false
}
// If the object doesn't have a modtime (IsZero), or the modtime