fix: changes empty mp parts error on CompleteMultipartUpload

Fixes #1328

If `CompleteMultipartUpload` is attempted with empty `Parts` list, the gateway used to return `InvalidRequest`. Now it's changed to `MalformedXML`.
This commit is contained in:
niksis02
2025-09-18 16:09:02 +04:00
parent 51e54874a8
commit ca6a92bb84
4 changed files with 3 additions and 9 deletions

View File

@@ -278,7 +278,7 @@ func (c S3ApiController) CompleteMultipartUpload(ctx *fiber.Ctx) (*Response, err
MetaOpts: &MetaOptions{
BucketOwner: parsedAcl.Owner,
},
}, s3err.GetAPIError(s3err.ErrEmptyParts)
}, s3err.GetAPIError(s3err.ErrMalformedXML)
}
var mpuObjectSize *int64

View File

@@ -404,7 +404,7 @@ func TestS3ApiController_CompleteMultipartUpload(t *testing.T) {
BucketOwner: "root",
},
},
err: s3err.GetAPIError(s3err.ErrEmptyParts),
err: s3err.GetAPIError(s3err.ErrMalformedXML),
},
},
{