const std::map<std::string, buffer::list>& bucket_attrs)
{
CephContext* cct = dpp->get_cct();
- RGWLifecycleConfiguration config(cct); // TODO: save in bucket info
+ RGWLifecycleConfiguration config(cct);
std::string hdr{""};
const auto& aiter = bucket_attrs.find(RGW_ATTR_LC);
// update earliest expiration
if (rule_expiration_date) {
if ((! expiration_date) ||
- ((expiration_date &&
- (*expiration_date < *rule_expiration_date)))) {
+ (*expiration_date < *rule_expiration_date)) {
expiration_date =
boost::optional<ceph::real_time>(rule_expiration_date);
}
return false;
}
+static inline void rgw_cond_decode_objtags(
+ struct req_state *s,
+ const std::map<std::string, buffer::list> &attrs)
+{
+ const auto& tags = attrs.find(RGW_ATTR_TAGS);
+ if (tags != attrs.end()) {
+ try {
+ bufferlist::const_iterator iter{&tags->second};
+ s->tagset.decode(iter);
+ } catch (buffer::error& err) {
+ ldout(s->cct, 0)
+ << "ERROR: caught buffer::error, couldn't decode TagSet" << dendl;
+ }
+ }
+}
+
void RGWGetObj::execute()
{
bufferlist bl;
goto done_err;
}
+ /* Decode S3 objtags, if any */
+ rgw_cond_decode_objtags(s, attrs);
+
start = ofs;
attr_iter = attrs.find(RGW_ATTR_MANIFEST);
}
encode_delete_at_attr(delete_at, attrs);
encode_obj_tags_attr(obj_tags.get(), attrs);
+ rgw_cond_decode_objtags(s, attrs);
/* Add a custom metadata to expose the information whether an object
* is an SLO or not. Appending the attribute must be performed AFTER