On copy objects, when bucket source is the same as the destination, use attrs
from source bucket.
Fixes: #11639
Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
(cherry picked from commit
1dac80df1d4a2364154ed8b404d13609936c257b)
if (src_bucket_name.compare(dest_bucket_name) == 0) { /* will only happen if s->local_source */
dest_bucket_info = src_bucket_info;
+ dest_attrs = src_attrs;
} else {
ret = store->get_bucket_info(s->obj_ctx, dest_bucket_name, dest_bucket_info, NULL, &dest_attrs);
if (ret < 0)