preserve Version and DeleteMarker sort order in the list XML response (#15819)

This commit is contained in:
Anis Elleuch
2022-10-08 00:12:36 +01:00
committed by GitHub
parent e856e10ac2
commit dfe0c96b87
3 changed files with 102 additions and 19 deletions

View File

@@ -1321,6 +1321,13 @@ func getMakeBucketURL(endPoint, bucketName string) string {
return makeTestTargetURL(endPoint, bucketName, "", url.Values{})
}
// return URL for creating the bucket.
func getBucketVersioningConfigURL(endPoint, bucketName string) string {
vals := make(url.Values)
vals.Set("versioning", "")
return makeTestTargetURL(endPoint, bucketName, "", vals)
}
// return URL for listing buckets.
func getListBucketURL(endPoint string) string {
return makeTestTargetURL(endPoint, "", "", url.Values{})
@@ -1369,6 +1376,19 @@ func getListObjectsV1URL(endPoint, bucketName, prefix, maxKeys, encodingType str
return makeTestTargetURL(endPoint, bucketName, prefix, queryValue)
}
// return URL for listing objects in the bucket with V1 legacy API.
func getListObjectVersionsURL(endPoint, bucketName, prefix, maxKeys, encodingType string) string {
queryValue := url.Values{}
if maxKeys != "" {
queryValue.Set("max-keys", maxKeys)
}
if encodingType != "" {
queryValue.Set("encoding-type", encodingType)
}
queryValue.Set("versions", "")
return makeTestTargetURL(endPoint, bucketName, prefix, queryValue)
}
// return URL for listing objects in the bucket with V2 API.
func getListObjectsV2URL(endPoint, bucketName, prefix, maxKeys, fetchOwner, encodingType string) string {
queryValue := url.Values{}