Merge pull request #2909 from oliparcol/bug/2759
S3 - Allow keys to start with leading slashes
This commit is contained in:
commit
efbb9c54a5
3 changed files with 25 additions and 2 deletions
|
|
@ -132,7 +132,8 @@ ACTION_MAP = {
|
|||
|
||||
|
||||
def parse_key_name(pth):
|
||||
return pth.lstrip("/")
|
||||
# strip the first '/' left by urlparse
|
||||
return pth[1:] if pth.startswith("/") else pth
|
||||
|
||||
|
||||
def is_delete_keys(request, path, bucket_name):
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ url_paths = {
|
|||
# path-based bucket + key
|
||||
"{0}/(?P<bucket_name_path>[^/]+)/(?P<key_name>.+)": S3ResponseInstance.key_or_control_response,
|
||||
# subdomain bucket + key with empty first part of path
|
||||
"{0}//(?P<key_name>.*)$": S3ResponseInstance.key_or_control_response,
|
||||
"{0}/(?P<key_name>/.*)$": S3ResponseInstance.key_or_control_response,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue