Make put-object-acl return 404 if the key does not exist (#3777)
Co-authored-by: Tibor Djurica Potpara <tibor.djurica@reddit.com>
This commit is contained in:
parent
b9f83c200f
commit
b06e77b604
2 changed files with 16 additions and 2 deletions
|
|
@ -1305,8 +1305,11 @@ class ResponseObject(_TemplateEnvironmentMixin, ActionAuthenticatorMixin):
|
|||
if "acl" in query:
|
||||
key = self.backend.get_object(bucket_name, key_name)
|
||||
# TODO: Support the XML-based ACL format
|
||||
key.set_acl(acl)
|
||||
return 200, response_headers, ""
|
||||
if key is not None:
|
||||
key.set_acl(acl)
|
||||
return 200, response_headers, ""
|
||||
else:
|
||||
raise MissingKey(key_name)
|
||||
|
||||
if "tagging" in query:
|
||||
if "versionId" in query:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue