From 2f1015c954b6bdfde532561dfc9ca70554d4b1e8 Mon Sep 17 00:00:00 2001 From: XDTD <1355582364@qq.com> Date: Fri, 13 Oct 2023 16:14:33 +0800 Subject: [PATCH] object/dragonfly: fix filter parse issue. Signed-off-by: XDTD <1355582364@qq.com> --- pkg/object/dragonfly.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/object/dragonfly.go b/pkg/object/dragonfly.go index c77d74cad1739..11e3f82cfb473 100644 --- a/pkg/object/dragonfly.go +++ b/pkg/object/dragonfly.go @@ -232,6 +232,10 @@ func (d *dragonfly) Get(key string, off, limit int64) (io.ReadCloser, error) { } query := u.Query() + if d.Filter != "" { + query.Add("filter", d.Filter) + } + u.RawQuery = query.Encode() req, err := http.NewRequestWithContext(ctx, http.MethodGet, u.String(), nil) @@ -518,7 +522,7 @@ func newDragonfly(_endpoint, _accessKey, _secretKey, _token string) (ObjectStora } if value := uri.Query().Get("filter"); value != "" { - filter = value + filter = strings.ReplaceAll(value, ",", "&") } return &dragonfly{