Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ public Response list(
ContinueToken decodedToken =
ContinueToken.decodeFromString(continueToken);

// Assign marker to startAfter. for the compatibility of aws api v1
if (startAfter == null && marker != null) {
startAfter = marker;
}
if (startAfter != null && continueToken != null) {
// If continuation token and start after both are provided, then we
// ignore start After
Expand All @@ -129,7 +133,7 @@ public Response list(
response.setDelimiter(delimiter);
response.setName(bucketName);
response.setPrefix(prefix);
response.setMarker("");
response.setMarker(marker == null ? "" : marker);
response.setMaxKeys(maxKeys);
response.setEncodingType(ENCODING_TYPE);
response.setTruncated(false);
Expand Down Expand Up @@ -187,6 +191,8 @@ public Response list(
response.setTruncated(true);
ContinueToken nextToken = new ContinueToken(lastKey, prevDir);
response.setNextToken(nextToken.encodeToString());
// Set nextMarker to be lastKey. for the compatibility of aws api v1
response.setNextMarker(lastKey);
} else {
response.setTruncated(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public class ListObjectResponse {
@XmlElement(name = "NextContinuationToken")
private String nextToken;

@XmlElement(name = "NextMarker")
private String nextMarker;

@XmlElement(name = "continueToken")
private String continueToken;

Expand Down Expand Up @@ -177,4 +180,12 @@ public int getKeyCount() {
public void setKeyCount(int keyCount) {
this.keyCount = keyCount;
}

public void setNextMarker(String nextMarker) {
this.nextMarker = nextMarker;
}

public String getNextMarker() {
return nextMarker;
}
}