[] Support percent-encoding
Some checks failed
/ DCO (pull_request) Failing after 53s
/ Vulncheck (pull_request) Successful in 2m1s
/ Builds (1.21) (pull_request) Successful in 2m2s
/ Builds (1.22) (pull_request) Successful in 2m0s
/ Lint (pull_request) Successful in 2m5s
/ Tests (1.21) (pull_request) Successful in 2m4s
/ Tests (1.22) (pull_request) Successful in 2m2s
Some checks failed
/ DCO (pull_request) Failing after 53s
/ Vulncheck (pull_request) Successful in 2m1s
/ Builds (1.21) (pull_request) Successful in 2m2s
/ Builds (1.22) (pull_request) Successful in 2m0s
/ Lint (pull_request) Successful in 2m5s
/ Tests (1.21) (pull_request) Successful in 2m4s
/ Tests (1.22) (pull_request) Successful in 2m2s
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
This commit is contained in:
parent
5ee09790f0
commit
4f0fb71f48
2 changed files with 8 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
||||||
This document outlines major changes between releases.
|
This document outlines major changes between releases.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
- Support percent-encoding for GET queries
|
||||||
|
|
||||||
## [0.30.0] - Kangshung - 2024-07-22
|
## [0.30.0] - Kangshung - 2024-07-22
|
||||||
|
|
||||||
|
|
|
@ -215,9 +215,15 @@ func (h *Handler) byObjectName(req *fasthttp.RequestCtx, f func(context.Context,
|
||||||
log = h.log.With(zap.String("bucketname", bucketname), zap.String("key", key))
|
log = h.log.With(zap.String("bucketname", bucketname), zap.String("key", key))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
unescapedName, err := url.QueryUnescape(bucketname)
|
||||||
|
if err != nil {
|
||||||
|
logAndSendBucketError(req, log, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ctx := utils.GetContextFromRequest(req)
|
ctx := utils.GetContextFromRequest(req)
|
||||||
|
|
||||||
bktInfo, err := h.getBucketInfo(ctx, bucketname, log)
|
bktInfo, err := h.getBucketInfo(ctx, unescapedName, log)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logAndSendBucketError(req, log, err)
|
logAndSendBucketError(req, log, err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue