]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: etag in rgw copy result response body rather in header 23751/head
authoryuliyang <yuliyang@cmss.chinamobile.com>
Mon, 27 Aug 2018 11:05:22 +0000 (19:05 +0800)
committeryuliyang <yuliyang@cmss.chinamobile.com>
Mon, 27 Aug 2018 11:34:01 +0000 (19:34 +0800)
Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
src/rgw/rgw_rest_s3.cc

index 2bb55e8a521e37720e99e6c0d3c3f5ef7444033e..44579da381b5923edd6d94f7c628a69f75cf8f3c 100644 (file)
@@ -2201,7 +2201,9 @@ void RGWCopyObj_ObjStore_S3::send_response()
 
   if (op_ret == 0) {
     dump_time(s, "LastModified", &mtime);
-    dump_etag(s, etag);
+    if (!etag.empty()) {
+      s->formatter->dump_string("ETag", std::move(etag));
+    }
     s->formatter->close_section();
     rgw_flush_formatter_and_reset(s, s->formatter);
   }