From e6ac5507627f9332d180b0611cf6e647aca282ec Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Tue, 6 Feb 2024 14:19:45 +0100 Subject: HTTP: Make sure to add all headers Now needed as we do some of the header code differently. Previously it worked because e.g. the accept header had one value that was capitalized --- internal/http/http.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/http/http.go b/internal/http/http.go index 262309a..b5250b6 100644 --- a/internal/http/http.go +++ b/internal/http/http.go @@ -115,7 +115,9 @@ func optionalHeaders(req *http.Request, opts *OptionalParams) { // Add headers if opts != nil && req != nil && opts.Headers != nil { for k, v := range opts.Headers { - req.Header.Add(k, v[0]) + for _, cv := range v { + req.Header.Add(k, cv) + } } } } -- cgit v1.2.3