Upstream versity/versitygw state of the touched files before aed4617372
This commit is contained in:
1 parent
7dce327c11
commit
613c71290f
3 files changed
+73
-120
No files matched your search
@@ -22,6 +22,7 @@ import (
|
||||
"github.com/gofiber/fiber/v3"
|
||||
"github.com/versity/versitygw/auth"
|
||||
"github.com/versity/versitygw/s3api/utils"
|
||||
"github.com/versity/versitygw/s3err"
|
||||
"github.com/versity/versitygw/s3response"
|
||||
)
|
||||
|
||||
@@ -614,6 +615,15 @@ func (c S3ApiController) ListObjects(ctx fiber.Ctx) (*Response, error) {
|
||||
region = defaultRegion
|
||||
}
|
||||
|
||||
// start-after is a ListObjectsV2 argument, S3 rejects it on a V1 listing
|
||||
if ctx.Query("start-after") != "" {
|
||||
return &Response{
|
||||
MetaOpts: &MetaOptions{
|
||||
BucketOwner: parsedAcl.Owner,
|
||||
},
|
||||
}, s3err.GetInvalidArgumentErr(s3err.InvalidArgStartAfter, "")
|
||||
}
|
||||
|
||||
err := c.verifyAccess(ctx, auth.AccessOptions{
|
||||
Acl: parsedAcl,
|
||||
AclPermission: auth.PermissionRead,
|
||||
@@ -656,12 +666,6 @@ func (c S3ApiController) ListObjects(ctx fiber.Ctx) (*Response, error) {
|
||||
}, err
|
||||
}
|
||||
|
||||
// S3 returns NextMarker only when the request has a delimiter. Without
|
||||
// one, clients use the last key in the response as the next marker.
|
||||
if delimiter == "" {
|
||||
res.NextMarker = nil
|
||||
}
|
||||
|
||||
// S3 echoes the request marker back in the response, and includes the
|
||||
// element even when the request carried no marker. Backends return a nil
|
||||
// pointer for an empty marker, which encoding/xml drops entirely, so
|
||||
|
||||
Reference in new issue
Block a user