mirror of
https://github.com/ceph/ceph
synced 2025-01-04 02:02:36 +00:00
Merge pull request #30584 from zhangsw/fix-rgw-expiration-header
rgw: filter prefix should be used when generating expiration header Reviewed-By: Abhishek Lekshmanan <abhishek@suse.com> Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
commit
29836e692c
@ -2154,8 +2154,8 @@ std::string s3_expiration_header(
|
||||
for (const auto& ri : rule_map) {
|
||||
const auto& rule = ri.second;
|
||||
auto& id = rule.get_id();
|
||||
auto& prefix = rule.get_prefix();
|
||||
auto& filter = rule.get_filter();
|
||||
auto& prefix = filter.has_prefix() ? filter.get_prefix(): rule.get_prefix();
|
||||
auto& expiration = rule.get_expiration();
|
||||
auto& noncur_expiration = rule.get_noncur_expiration();
|
||||
|
||||
@ -2185,7 +2185,7 @@ std::string s3_expiration_header(
|
||||
|
||||
if(! prefix.empty()) {
|
||||
if (! boost::starts_with(obj_key.name, prefix))
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (filter.has_tags()) {
|
||||
|
Loading…
Reference in New Issue
Block a user