Skip to content

Commit

Permalink
fix(forwarder): retain query parameters (#258)
Browse files Browse the repository at this point in the history
We should retain query parameters for any URL provided to us.
  • Loading branch information
jta authored May 15, 2024
1 parent d0f85e5 commit 386954b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions handler/forwarder/s3http/internal/request/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ type Builder struct {
}

func (b *Builder) With(params map[string]string, headers map[string]string) *Handler {
values := make(url.Values, len(params))
u, _ := url.Parse(b.URL)

query := u.Query()
for k, v := range params {
values.Add(k, v)
query.Add(k, v)
}

u, _ := url.Parse(b.URL)
u.RawQuery = values.Encode()
u.RawQuery = query.Encode()

client := b.Client
if client == nil {
Expand Down

0 comments on commit 386954b

Please sign in to comment.