File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -6649,6 +6649,9 @@ void RGWInitMultipart::execute(optional_yield y)
66496649 return ;
66506650 }
66516651
6652+ encode_obj_tags_attr (obj_tags, attrs);
6653+ rgw_cond_decode_objtags (s, attrs);
6654+
66526655 std::unique_ptr<rgw::sal::MultipartUpload> upload;
66536656 upload = s->bucket ->get_multipart_upload (s->object ->get_name (),
66546657 upload_id);
Original file line number Diff line number Diff line change @@ -1904,6 +1904,7 @@ class RGWSetRequestPayment : public RGWOp {
19041904
19051905class RGWInitMultipart : public RGWOp {
19061906protected:
1907+ RGWObjTags obj_tags;
19071908 std::string upload_id;
19081909 RGWAccessControlPolicy policy;
19091910 ceph::real_time mtime;
Original file line number Diff line number Diff line change @@ -4334,6 +4334,18 @@ int RGWInitMultipart_ObjStore_S3::get_params(optional_yield y)
43344334 if (ret < 0 )
43354335 return ret;
43364336
4337+ auto tag_str = s->info .env ->get (" HTTP_X_AMZ_TAGGING" );
4338+ if (tag_str) {
4339+ ret = obj_tags.set_from_string (tag_str);
4340+ if (ret < 0 ) {
4341+ ldpp_dout (this , 0 ) << " setting obj tags failed with " << ret << dendl;
4342+ if (ret == -ERR_INVALID_TAG) {
4343+ ret = -EINVAL; // s3 returns only -EINVAL for PUT requests
4344+ }
4345+ return ret;
4346+ }
4347+ }
4348+
43374349 // handle object lock
43384350 auto obj_lock_mode_str = s->info .env ->get (" HTTP_X_AMZ_OBJECT_LOCK_MODE" );
43394351 auto obj_lock_date_str = s->info .env ->get (" HTTP_X_AMZ_OBJECT_LOCK_RETAIN_UNTIL_DATE" );
You can’t perform that action at this time.
0 commit comments