versitygw
versitygw copied to clipboard
[Bug] - ListObjectVersions without versioning and --versioning-dir set returns incorrect format
Describe the bug When versioning is disabled, a ListObjectVersions call direct-to-s3 returns the "versions" in the following format:
<ListVersionsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Name>versity-gwtest-bucket-luke-four-1</Name>
<Prefix></Prefix>
<KeyMarker></KeyMarker>
<VersionIdMarker></VersionIdMarker>
<MaxKeys>1000</MaxKeys>
<IsTruncated>false</IsTruncated>
<Version>
<Key>test_file</Key>
<VersionId>null</VersionId>
<IsLatest>true</IsLatest>
<LastModified>2024-10-03T14:29:55.000Z<LastModified>
<ETag>"af05f4e3ca4b44d207cc0a6c3f8fc90d"</ETag>
<Size>10</Size>
<Owner>
<ID>{id}</ID>
<DisplayName>{name}</DisplayName>
</Owner>
<StorageClass>STANDARD</StorageClass>
</Version>
</ListVersionsResult>
This same format is returned by versitygw when the --versioning-dir
param is set but versioning is disabled. However, when the --versioning-dir
param isn't set, the versions are missing.
<?xml version="1.0" encoding="UTF-8"?>
<ListVersionsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<EncodingType></EncodingType>
<RequestCharged></RequestCharged>
</ListVersionsResult>
To Reproduce
- Start versitygw without the
--versioning-dir
parameter set. - Create a bucket, and add an object to it.
- Send the ListObjectVersions command
Expected behavior
The same data that is returned when --versioning-dir
is set but versioning isn't enabled is returned.
Server Version Version : v1.0.7 Build : c9f77ed BuildTime: 2024-10-01_10:02:21PM Darwin Lukes-MacBook-Pro.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:25 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6030 arm64