]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: copy_object should not override ETAG implicitly
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 26 Sep 2012 22:43:56 +0000 (15:43 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 27 Sep 2012 19:52:21 +0000 (12:52 -0700)
When copying an object with new attrs, we still need to
maintain the ETAG.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Conflicts:
src/rgw/rgw_rados.cc

src/rgw/rgw_rados.cc

index 7531309026ebc3b06206fa7be1b674ade755cbbd..0114204f6ff22a43f18b3c73de0680f839b97fa0 100644 (file)
@@ -1230,6 +1230,9 @@ int RGWRados::copy_obj(void *ctx,
     return ret;
 
   if (replace_attrs) {
+    if (!attrs[RGW_ATTR_ETAG].length())
+      attrs[RGW_ATTR_ETAG] = attrset[RGW_ATTR_ETAG];
+
     attrset = attrs;
   }