Skip to content

Commit

Permalink
Restore OPAQUE_MARKERS handling for list objects V1
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
larshagencognite committed Oct 24, 2023
1 parent e6955af commit f7f74b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/gaul/s3proxy/S3ProxyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1490,8 +1490,12 @@ private void handleBlobList(HttpServletRequest request,
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 {
Expand Down

0 comments on commit f7f74b1

Please sign in to comment.