fix: drop upload-id-marker without key-marker in ListMultipartUploads
An upload-id-marker sent without a key-marker is ignored for the listing, but the gateway still echoed it back in UploadIdMarker. S3 discards the parameter in that case and returns an empty UploadIdMarker. Clear the marker in the controller when no key-marker is given, so every backend gets the same input and the response no longer reports a marker that had no effect. Fixes #2150
This commit is contained in:
1 parent
79e4cf7bca
commit
7a0b44c275
2 files changed
+11
No files matched your search
@@ -472,6 +472,11 @@ func (c S3ApiController) ListMultipartUploads(ctx fiber.Ctx) (*Response, error)
|
||||
keyMarker := ctx.Query("key-marker")
|
||||
maxUploadsStr := ctx.Query("max-uploads")
|
||||
uploadIdMarker := ctx.Query("upload-id-marker")
|
||||
// upload-id-marker is ignored without a key-marker,
|
||||
// so it shouldn't be echoed back in the response either
|
||||
if keyMarker == "" {
|
||||
uploadIdMarker = ""
|
||||
}
|
||||
// context keys
|
||||
acct := utils.ContextKeyAccount.Get(ctx).(auth.Account)
|
||||
isRoot := utils.ContextKeyIsRoot.Get(ctx).(bool)
|
||||
|
||||
Reference in new issue
Block a user