mirror of
https://github.com/versity/versitygw.git
synced 2026-09-25 09:24:22 +00:00
feat: Added integration tests for bucket object versioning. Made a couple of bug fixes in the versioning implementation
This commit is contained in:
committed by
Ben McClelland
parent
8252ecd452
commit
6d4ff09d6f
@@ -495,6 +495,15 @@ func (c S3ApiController) GetActions(ctx *fiber.Ctx) error {
|
||||
utils.SetMetaHeaders(ctx, res.Metadata)
|
||||
// Set other response headers
|
||||
utils.SetResponseHeaders(ctx, hdrs)
|
||||
// Set version id header
|
||||
if getstring(res.VersionId) != "" {
|
||||
utils.SetResponseHeaders(ctx, []utils.CustomHeader{
|
||||
{
|
||||
Key: "x-amz-version-id",
|
||||
Value: getstring(res.VersionId),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
status := http.StatusOK
|
||||
if acceptRange != "" {
|
||||
@@ -2945,6 +2954,7 @@ func (c S3ApiController) HeadObject(ctx *fiber.Ctx) error {
|
||||
Value: getstring(res.VersionId),
|
||||
})
|
||||
}
|
||||
|
||||
utils.SetResponseHeaders(ctx, headers)
|
||||
|
||||
return SendResponse(ctx, nil,
|
||||
|
||||
Reference in New Issue
Block a user