mirror of
https://github.com/ceph/ceph
synced 2025-02-07 10:53:30 +00:00
Merge pull request #13303 from Jing-Scott/fix-swift-cannot-disable-object-versioning
rgw: fix swift cannot disable object versioning @Jing-Scott updated, addressing @rzarzynski's change request
This commit is contained in:
commit
24f43e9f51
@ -603,8 +603,7 @@ static int get_swift_versioning_settings(
|
||||
swift_ver_location = boost::in_place(std::string());
|
||||
}
|
||||
|
||||
std::string vloc = s->info.env->get("HTTP_X_VERSIONS_LOCATION", "");
|
||||
if (vloc.size()) {
|
||||
if (s->info.env->exists("HTTP_X_VERSIONS_LOCATION")) {
|
||||
/* If the Swift's versioning is globally disabled but someone wants to
|
||||
* enable it for a given container, new version of Swift will generate
|
||||
* the precondition failed error. */
|
||||
@ -612,7 +611,7 @@ static int get_swift_versioning_settings(
|
||||
return -ERR_PRECONDITION_FAILED;
|
||||
}
|
||||
|
||||
swift_ver_location = std::move(vloc);
|
||||
swift_ver_location = s->info.env->get("HTTP_X_VERSIONS_LOCATION", "");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user