From: Yehuda Sadeh Date: Fri, 4 Oct 2013 20:00:26 +0000 (-0700) Subject: rgw: swift update obj metadata also add generic attrs X-Git-Tag: v0.71~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f2645e1c6d7383a0ace3b239f4304e353249c4bb;p=ceph.git rgw: swift update obj metadata also add generic attrs Fixes: #6462 We were missing the generic attributes when we updated the object metadata (operation that only exists in the swift api). Reviewed-by: Josh Durgin Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 114b8709a223..fc4ad6d3511d 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -1604,6 +1604,13 @@ void RGWPutMetadata::execute() } } + map::iterator giter; + for (giter = s->generic_attrs.begin(); giter != s->generic_attrs.end(); ++giter) { + bufferlist& attrbl = attrs[giter->first]; + const string& val = giter->second; + attrbl.append(val.c_str(), val.size() + 1); + } + if (has_policy) { policy.encode(bl); attrs[RGW_ATTR_ACL] = bl;