]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix post obj does not return the response etag field 54546/head
authorlimingze <limingze_yewu@cmss.chinamobile.com>
Fri, 17 Nov 2023 11:33:48 +0000 (12:33 +0100)
committerlimingze <limingze_yewu@cmss.chinamobile.com>
Thu, 30 Nov 2023 07:48:50 +0000 (08:48 +0100)
When the post obj is successful, no etag field is returned
in the request response, which is inconsistent with aws.

Signed-off-by: limingze <limingze_yewu@cmss.chinamobile.com>
src/rgw/rgw_rest_s3.cc

index 6d56766d10eb72d1c8a1dc1388a0a91a0f5d1d61..734a2bc8e85dcf7142c7617a0e2ec443d2c0b0d9 100644 (file)
@@ -3368,6 +3368,9 @@ done:
   if (op_ret >= 0) {
     dump_content_length(s, s->formatter->get_len());
   }
+  if (op_ret == STATUS_NO_CONTENT) {
+    dump_etag(s, etag);
+  }
   end_header(s, this);
   if (op_ret != STATUS_CREATED)
     return;