forked from TrueCloudLab/frostfs-s3-gw
[#382] Fix request type determination
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
2ab655b909
commit
c43ef040dc
2 changed files with 84 additions and 2 deletions
|
@ -215,11 +215,11 @@ func getBucketObject(r *http.Request, domains []string) (reqType ReqType, bktNam
|
|||
return noneType, "", ""
|
||||
}
|
||||
|
||||
if ind := strings.IndexByte(bktObj, '/'); ind != -1 {
|
||||
if ind := strings.IndexByte(bktObj, '/'); ind != -1 && bktObj[ind+1:] != "" {
|
||||
return objectType, bktObj[:ind], bktObj[ind+1:]
|
||||
}
|
||||
|
||||
return bucketType, bktObj, ""
|
||||
return bucketType, strings.TrimSuffix(bktObj, "/"), ""
|
||||
}
|
||||
|
||||
func determineOperation(r *http.Request, reqType ReqType) (operation string) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue