Restore OPAQUE_MARKERS handling for list objects V1

We need this to support V1 clients that use the last object
name in the response as a marker for the next page (which is
allowed according to the S3 docs).
pull/569/head
Lars Hagen 2023-10-24 11:27:41 +02:00
rodzic e6955afb43
commit f7f74b1ec0
1 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -1490,8 +1490,12 @@ public class S3ProxyHandler {
if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) {
StorageMetadata sm = Streams.findLast(set.stream()).orElse(null);
if (sm != null) {
lastKeyToMarker.put(Maps.immutableEntry(containerName,
encodeBlob(encodingType, nextMarker)), nextMarker);
// TODO: verify if we need this handling at all for V2
String lastKey = isListV2 ? encodeBlob(encodingType, nextMarker) : sm.getName();
lastKeyToMarker.put(
Maps.immutableEntry(containerName, lastKey),
nextMarker
);
}
}
} else {