fix: accept upload-id-marker together with key-marker in ListMultipartUploads
The posix and azure backends dropped every upload with a key equal to the key-marker before handing the list to the lister, which then looked for the upload-id-marker under the next key. An upload-id-marker that belongs to the key-marker could never be found, so the request failed with "Invalid uploadId marker", including when a client paged with the NextKeyMarker and NextUploadIdMarker the gateway returned. Keep the uploads of the key-marker itself when an upload-id-marker is set, so the listing continues right after the given upload, as S3 does. Enable the REST test that covers it. Fixes #2149
This commit is contained in:
1 parent
f81c6a5acb
commit
cbe870a618
6 files changed
+55
-11
No files matched your search
@@ -3472,8 +3472,9 @@ func (p *Posix) ListMultipartUploads(ctx context.Context, mpu *s3.ListMultipartU
|
||||
if prefix != "" && !strings.HasPrefix(objectName, prefix) {
|
||||
continue
|
||||
}
|
||||
// filter by keyMarker
|
||||
if keyMarker != "" && objectName <= keyMarker {
|
||||
// filter by keyMarker, keeping the uploads of the key-marker
|
||||
// itself when an upload-id-marker is set
|
||||
if keyMarker != "" && (objectName < keyMarker || (objectName == keyMarker && uploadIDMarker == "")) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user