summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-10-04 13:00:26 -0700
committerYehuda Sadeh <yehuda@inktank.com>2013-10-14 11:27:19 -0700
commite6e9ee7145bcfc1774af738af607a653fe8dfe46 (patch)
treec6d70650ad708298c645dcf646f57000415e047d
parentcd1c3c9e00e90b19e83c1f11a48e516a7de93665 (diff)
downloadceph-e6e9ee7145bcfc1774af738af607a653fe8dfe46.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> (cherry picked from commit f2645e1c6d7383a0ace3b239f4304e353249c4bb)
-rw-r--r--src/rgw/rgw_op.cc7
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;