mirror of
https://github.com/ceph/ceph
synced 2024-12-21 02:42:48 +00:00
Merge pull request #15045 from shashalu/fix-slo
rgw: fix X-Object-Meta-Static-Large-Object in SLO download Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
commit
f0300415af
@ -3381,7 +3381,7 @@ void RGWPutObj::execute()
|
||||
* processing any input from user in order to prohibit overwriting. */
|
||||
if (slo_info) {
|
||||
bufferlist slo_userindicator_bl;
|
||||
::encode("True", slo_userindicator_bl);
|
||||
slo_userindicator_bl.append("True", 4);
|
||||
emplace_attr(RGW_ATTR_SLO_UINDICATOR, std::move(slo_userindicator_bl));
|
||||
}
|
||||
|
||||
|
@ -275,6 +275,9 @@ int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs,
|
||||
if (!content_type) {
|
||||
content_type = iter->second.c_str();
|
||||
}
|
||||
} else if (strcmp(name, RGW_ATTR_SLO_UINDICATOR) == 0) {
|
||||
// this attr has an extra length prefix from ::encode() in prior versions
|
||||
dump_header(s, "X-Object-Meta-Static-Large-Object", "True");
|
||||
} else if (strncmp(name, RGW_ATTR_META_PREFIX,
|
||||
sizeof(RGW_ATTR_META_PREFIX)-1) == 0) {
|
||||
/* User custom metadata. */
|
||||
|
@ -1105,6 +1105,9 @@ static void dump_object_metadata(struct req_state * const s,
|
||||
|
||||
if (aiter != std::end(rgw_to_http_attrs)) {
|
||||
response_attrs[aiter->second] = kv.second.c_str();
|
||||
} else if (strcmp(name, RGW_ATTR_SLO_UINDICATOR) == 0) {
|
||||
// this attr has an extra length prefix from ::encode() in prior versions
|
||||
dump_header(s, "X-Object-Meta-Static-Large-Object", "True");
|
||||
} else if (strncmp(name, RGW_ATTR_META_PREFIX,
|
||||
sizeof(RGW_ATTR_META_PREFIX)-1) == 0) {
|
||||
name += sizeof(RGW_ATTR_META_PREFIX) - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user