attrs[RGW_ATTR_DELETE_AT] = delatbl;
}
-static int encode_obj_manifest_attr(const char * const obj_manifest,
+static int encode_dlo_manifest_attr(const char * const dlo_manifest,
map<string, bufferlist>& attrs)
{
- string om = obj_manifest;
+ string dm = dlo_manifest;
- if (om.find('/') == string::npos) {
+ if (dm.find('/') == string::npos) {
return -EINVAL;
}
bufferlist manifest_bl;
- manifest_bl.append(obj_manifest, strlen(obj_manifest) + 1);
+ manifest_bl.append(dlo_manifest, strlen(dlo_manifest) + 1);
attrs[RGW_ATTR_USER_MANIFEST] = manifest_bl;
return 0;
map<string, string>::iterator iter;
bool multipart;
- bool need_calc_md5 = (obj_manifest == NULL);
+ bool need_calc_md5 = (dlo_manifest == NULL);
perfcounter->inc(l_rgw_put);
attrs[RGW_ATTR_ACL] = aclbl;
- if (obj_manifest) {
- ret = encode_obj_manifest_attr(obj_manifest, attrs);
+ if (dlo_manifest) {
+ ret = encode_dlo_manifest_attr(dlo_manifest, attrs);
if (ret < 0) {
- ldout(s->cct, 0) << "bad user manifest: " << obj_manifest << dendl;
+ ldout(s->cct, 0) << "bad user manifest: " << dlo_manifest << dendl;
goto done;
}
}
populate_with_generic_attrs(s, attrs);
encode_delete_at_attr(delete_at, attrs);
- if (obj_manifest) {
- ret = encode_obj_manifest_attr(obj_manifest, attrs);
+ if (dlo_manifest) {
+ ret = encode_dlo_manifest_attr(dlo_manifest, attrs);
if (ret < 0) {
- ldout(s->cct, 0) << "bad user manifest: " << obj_manifest << dendl;
+ ldout(s->cct, 0) << "bad user manifest: " << dlo_manifest << dendl;
return;
}
}
string etag;
bool chunked_upload;
RGWAccessControlPolicy policy;
- const char *obj_manifest;
+ const char *dlo_manifest;
time_t mtime;
uint64_t olh_epoch;
if_match = NULL;
if_nomatch = NULL;
chunked_upload = false;
- obj_manifest = NULL;
+ dlo_manifest = NULL;
mtime = 0;
olh_epoch = 0;
delete_at = 0;
RGWAccessControlPolicy policy;
string placement_rule;
time_t delete_at;
- const char *obj_manifest;
+ const char *dlo_manifest;
public:
RGWPutMetadataObject()
: ret(0),
delete_at(0),
- obj_manifest(NULL)
+ dlo_manifest(NULL)
{}
virtual void init(RGWRados *store, struct req_state *s, RGWHandler *h) {
policy.create_default(s->user.user_id, s->user.display_name);
- obj_manifest = s->info.env->get("HTTP_X_OBJECT_MANIFEST");
+ dlo_manifest = s->info.env->get("HTTP_X_OBJECT_MANIFEST");
int r = get_delete_at_param(s, &delete_at);
if (r < 0) {
}
placement_rule = s->info.env->get("HTTP_X_STORAGE_POLICY", "");
- obj_manifest = s->info.env->get("HTTP_X_OBJECT_MANIFEST");
+ dlo_manifest = s->info.env->get("HTTP_X_OBJECT_MANIFEST");
return 0;
}