Fix duplicate bucket creation with LocationConstraint. Closes #970.
This commit is contained in:
parent
49c947ece7
commit
113bfcb4ea
2 changed files with 22 additions and 0 deletions
|
|
@ -336,6 +336,12 @@ class ResponseObject(_TemplateEnvironmentMixin):
|
|||
self.backend.set_bucket_website_configuration(bucket_name, body)
|
||||
return ""
|
||||
else:
|
||||
if body:
|
||||
try:
|
||||
region_name = xmltodict.parse(body)['CreateBucketConfiguration']['LocationConstraint']
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
try:
|
||||
new_bucket = self.backend.create_bucket(
|
||||
bucket_name, region_name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue