mirror of
https://github.com/versity/versitygw.git
synced 2026-07-26 10:02:42 +00:00
fix: omit null version id for suspended buckets
Keep null as the stored object version ID when bucket versioning is suspended, but omit x-amz-version-id from the PutObject response to match Amazon S3. Update the existing versioning integration coverage to distinguish the PutObject response from the null version returned by ListObjectVersions, and verify empty response headers are not rendered. Fixes #2164 Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
9f6cb2a760
commit
8a3dbcf97d
@@ -3938,6 +3938,12 @@ func (p *Posix) PutObjectWithPostFunc(ctx context.Context, po s3response.PutObje
|
||||
}
|
||||
}
|
||||
|
||||
// "null" identifies the current object internally while versioning is
|
||||
// suspended, but S3 omits the version ID from the PutObject response.
|
||||
if versionID == nullVersionId {
|
||||
versionID = ""
|
||||
}
|
||||
|
||||
err = postprocess(f.File())
|
||||
if err != nil {
|
||||
return s3response.PutObjectOutput{},
|
||||
|
||||
Reference in New Issue
Block a user