rgw: copy_object should not override ETAG implicitly

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
This commit is contained in:
Yehuda Sadeh 2012-09-26 15:43:56 -07:00
parent 25a9620a72
commit 214327ef6f

View 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;
}