S3 DeleteObjects - Allow multiple querystring formats
This commit is contained in:
parent
c39924501b
commit
49b00942c3
2 changed files with 8 additions and 3 deletions
|
|
@ -137,8 +137,13 @@ def parse_key_name(pth):
|
|||
|
||||
|
||||
def is_delete_keys(request, path, bucket_name):
|
||||
return path == "/?delete" or (
|
||||
path == "/" and getattr(request, "query_string", "") == "delete"
|
||||
# GOlang sends a request as url/?delete= (treating it as a normal key=value, even if the value is empty)
|
||||
# Python sends a request as url/?delete (treating it as a flag)
|
||||
# https://github.com/spulec/moto/issues/2937
|
||||
return (
|
||||
path == "/?delete"
|
||||
or path == "/?delete="
|
||||
or (path == "/" and getattr(request, "query_string", "") == "delete")
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue