From 1be4399edda33c381a727c51e1d232b3ea8f773b Mon Sep 17 00:00:00 2001 From: Matt Benjamin Date: Sat, 12 Oct 2024 18:20:31 -0400 Subject: [PATCH] rgw_cksum: return version_id in all cases The version_id member in RGWGetObjAttrs shadows the one in RGWGetObj. Just assign it before conditionally returning the version-id header in RGWGetObjAttrs_ObjStore_S3::send_response(). Signed-off-by: Matt Benjamin --- src/rgw/rgw_rest_s3.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index da02c5a6256c3..234c26abbda2e 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -3865,6 +3865,8 @@ void RGWGetObjAttrs_ObjStore_S3::send_response() dump_errno(s); if (op_ret == 0) { + version_id = s->object->get_instance(); + // x-amz-delete-marker: DeleteMarker // not sure we can plausibly do this? dump_last_modified(s, lastmod); dump_header_if_nonempty(s, "x-amz-version-id", version_id); -- 2.39.5