Skip to content

Commit

Permalink
object/dragonfly: fix filter parse issue.
Browse files Browse the repository at this point in the history
Signed-off-by: XDTD <[email protected]>
  • Loading branch information
XDTD committed Oct 18, 2023
1 parent dd27441 commit 2f1015c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/object/dragonfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 2f1015c

Please sign in to comment.