-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Direct - something like:
HTTP/1.1 200 OK
x-amz-id-2: XOYgW0s1d5dZynZfKca9NPNAL6Kop6vh1nugic1uDcW4m0GC40AFS0Pu1rRgB1unqozzgAWh2P0=
x-amz-request-id: 5CXWRF8B9TBSJ3H6
Date: Fri, 12 Dec 2025 13:10:59 GMT
x-amz-version-id: XJ0TEe6vAa2723Pz2.JJYIO1gmM7uj4w
Transfer-Encoding: chunked
Server: AmazonS3
<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><TagSet><Tag><Key>key</Key><Value>value</Value></Tag></TagSet></Tagging>
versitygw:
HTTP/1.1 200 OK
Server: VERSITYGW
Date: Fri, 12 Dec 2025 13:12:14 GMT
Content-Type: application/xml
Content-Length: 168
Connection: close
<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><TagSet><Tag><Key>key</Key><Value>value</Value></Tag></TagSet></Tagging>
versitygw's is missing the x-amz-version-id header, which makes it clear that these are the version's tags rather than the current object's.
To Reproduce
- Start versitygw, e.g.:
./versitygw --access=AKIA**** --secret=******** --region=us-east-1 --cert /Users/lukemccrone/devel/versitygw/cert.pem --key /Users/lukemccrone/devel/versitygw/versitygw.pem posix --versioning-dir /tmp/versioning /tmp/gw - Create a bucket, e.g.:
curl -ks -w %{http_code} -X PUT https://localhost:7070/versity-gwtest-bucket-one-1-20251212101211 -H Authorization: AWS4-HMAC-SHA256 Credential=AKIA6****/20251212/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=b5605940b254c7f204eeae6c39fdd20362e479551aa3e1b5477d5e18e6c33ec0 -H host: localhost:7070 -H x-amz-content-sha256: UNSIGNED-PAYLOAD -H x-amz-date: 20251212T131212Z -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/output.txt - Enable versioning, e.g.:
curl -ks -w %{http_code} -X PUT https://localhost:7070/versity-gwtest-bucket-one-1-20251212101211?versioning= -H Authorization: AWS4-HMAC-SHA256 Credential=AKIA6****/20251212/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=affecb4b35d3ffbb53478829b8c66adc7c2b0f8da2b05ebc924977a2dc924c43 -H x-amz-content-sha256: 5f0b71a777cbca4aab899a9d14fadf04b6f7a41a6447599f4a499612c2eb5d44 -H x-amz-date: 20251212T131212Z -d <?xml version="1.0" encoding="UTF-8"?> <VersioningConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Status>Enabled</Status> </VersioningConfiguration> -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/error.txt - Create and add an object, e.g.:
curl -ks -w %{http_code} -X PUT https://localhost:7070/versity-gwtest-bucket-one-1-20251212101211/test_file -H Authorization: AWS4-HMAC-SHA256 Credential=AKIA6****/20251212/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=7f8a956e280d6dab86b7135d682642a9d0b3115825c60e7caaa887bfa6500966 -H host: localhost:7070 -H x-amz-content-sha256: d3b984cd608d4b555a5b4aa1c547e52d0ca7d92c03d96e4f1a9561a6ce445244 -H x-amz-date: 20251212T131212Z -T /Users/lukemccrone/devel/versitygw/versity-gwtest-files/test_file -o /Users/lukemccrone/devel/versitygw/versity-gwtest-files/output.txt - Repeat step four to create two versions.
- Get the version ID where
IsLatestisfalsewith the command:curl -iks https://localhost:7070/versity-gwtest-bucket-one-1-20251212101211?versions= -H Authorization: AWS4-HMAC-SHA256 Credential=AKIA6****/20251212/us-east-1/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=2645dbf1456395edcfd518ce777574a59dde9f3830652f085e11a7a8ca0bd4b6 -H host: localhost:7070 -H x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -H x-amz-date: 20251212T131213Z - Add tags using this version ID:
curl -iks -X PUT https://localhost:7070/versity-gwtest-bucket-one-1-20251212101211/test_file?tagging=&versionId=01KC9B1GYTX79G4X7D59VNEBPQ -H Authorization: AWS4-HMAC-SHA256 Credential=AKIA6****/20251212/us-east-1/s3/aws4_request,SignedHeaders=content-md5;host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length,Signature=c016d766281ea17959bfb56f2e1a5dc94973bd51365796a2341491f891d3d75a -H Content-MD5: k1QkVFOEQSf4+C6IGMjXMQ== -H host: localhost:7070 -H x-amz-content-sha256: 4a44333b7ad98cc6532252d35176746fd0678819c0f9555110102fb16be46a90 -H x-amz-date: 20251212T131214Z -H x-amz-decoded-content-length: 169 -H Content-Type: application/xml -d <?xml version="1.0" encoding="UTF-8"?> <Tagging xmlns="https://s3.amazonaws.com/doc/2006-03-01/"><TagSet><Tag><Key>key</Key><Value>value</Value></Tag></TagSet></Tagging> - Read tags back:
curl -iks https://localhost:7070/versity-gwtest-bucket-one-1-20251212101211/test_file?tagging=&versionId=01KC9B1GYTX79G4X7D59VNEBPQ -H Authorization: AWS4-HMAC-SHA256 Credential=AKIA6****/20251212/us-east-1/s3/aws4_request,SignedHeaders=content-md5;host;x-amz-content-sha256;x-amz-date,Signature=3e0e2de0fad06d4eda1f553c65bcefb9b6247e747cf4a647b8948dbc9c159e3f -H Content-MD5: 1B2M2Y8AsgTpgAmY7PhCfg== -H host: localhost:7070 -H x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -H x-amz-date: 20251212T131214Z
Expected behavior
x-amz-version-id header with version ID is included.
Server Version
Version : v1.0.19
Build : d62593e
BuildTime: 2025-12-09_09:14:27PM
Darwin Lukes-MacBook-Pro.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030 arm64
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done