|
|
|
@ -80,17 +80,9 @@ func (api objectAPIHandlers) ListObjectsV2Handler(w http.ResponseWriter, r *http |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// In ListObjectsV2 'continuation-token' is the marker.
|
|
|
|
|
marker := token |
|
|
|
|
// Check if 'continuation-token' is empty.
|
|
|
|
|
if token == "" { |
|
|
|
|
// Then we need to use 'start-after' as marker instead.
|
|
|
|
|
marker = startAfter |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Validate the query params before beginning to serve the request.
|
|
|
|
|
// fetch-owner is not validated since it is a boolean
|
|
|
|
|
if s3Error := validateListObjectsArgs(prefix, marker, delimiter, maxKeys); s3Error != ErrNone { |
|
|
|
|
if s3Error := validateListObjectsArgs(prefix, token, delimiter, maxKeys); s3Error != ErrNone { |
|
|
|
|
writeErrorResponse(w, s3Error, r.URL) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
@ -101,7 +93,7 @@ func (api objectAPIHandlers) ListObjectsV2Handler(w http.ResponseWriter, r *http |
|
|
|
|
// Inititate a list objects operation based on the input params.
|
|
|
|
|
// On success would return back ListObjectsInfo object to be
|
|
|
|
|
// marshaled into S3 compatible XML header.
|
|
|
|
|
listObjectsV2Info, err := listObjectsV2(ctx, bucket, prefix, marker, delimiter, maxKeys, fetchOwner, startAfter) |
|
|
|
|
listObjectsV2Info, err := listObjectsV2(ctx, bucket, prefix, token, delimiter, maxKeys, fetchOwner, startAfter) |
|
|
|
|
if err != nil { |
|
|
|
|
writeErrorResponse(w, toAPIErrorCode(err), r.URL) |
|
|
|
|
return |
|
|
|
|