GCS gateway allows apps to supply their own marker (#4495)

Most s3 compatible apps use object keys returned in listing as
marker. This change allows this behaviour with gateway-gcs too.
This commit is contained in:
Krishnan Parthasarathi
2017-06-10 02:48:20 +00:00
committed by Harshavardhana
parent d86973dcca
commit 4fb5fc72d7
3 changed files with 69 additions and 10 deletions

View File

@@ -741,15 +741,11 @@ func (api gatewayAPIHandlers) ListObjectsV1Handler(w http.ResponseWriter, r *htt
return
}
// Extract all the litsObjectsV1 query params to their native values.
// Extract all the listObjectsV1 query params to their native
// values. N B We delegate validation of params to respective
// gateway backends.
prefix, marker, delimiter, maxKeys, _ := getListObjectsV1Args(r.URL.Query())
// Validate all the query params before beginning to serve the request.
if s3Error := validateListObjectsArgs(prefix, marker, delimiter, maxKeys); s3Error != ErrNone {
writeErrorResponse(w, s3Error, r.URL)
return
}
listObjects := objectAPI.ListObjects
if reqAuthType == authTypeAnonymous {
listObjects = objectAPI.AnonListObjects