]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_cksum: return version_id in all cases
authorMatt Benjamin <mbenjamin@redhat.com>
Sat, 12 Oct 2024 22:20:31 +0000 (18:20 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Wed, 8 Jan 2025 00:17:21 +0000 (19:17 -0500)
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 <mbenjamin@redhat.com>
src/rgw/rgw_rest_s3.cc

index da02c5a6256c30826986e8ff42eca7f805869d44..234c26abbda2e76cb939ce00c0009d079c57ee8d 100644 (file)
@@ -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);