diff options
author | Yehuda Sadeh <yehuda@inktank.com> | 2013-10-04 13:00:26 -0700 |
---|---|---|
committer | Yehuda Sadeh <yehuda@inktank.com> | 2013-10-14 11:26:39 -0700 |
commit | f2645e1c6d7383a0ace3b239f4304e353249c4bb (patch) | |
tree | 80327f565e0e64ad5ef94d69f0a55e193aef55d5 | |
parent | fb96740651f99a83ccf229ed3256f6611a4811c6 (diff) | |
download | ceph-f2645e1c6d7383a0ace3b239f4304e353249c4bb.tar.gz |
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 <josh.durgin@inktank.com>
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r-- | src/rgw/rgw_op.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 114b8709a22..fc4ad6d3511 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -1604,6 +1604,13 @@ void RGWPutMetadata::execute() } } + map<string, string>::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; |