diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-02-06 14:19:45 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-02-19 14:15:07 +0100 |
| commit | e6ac5507627f9332d180b0611cf6e647aca282ec (patch) | |
| tree | 5a110fd1c49236e480c0810b8f9830ff18ce8e19 /internal/http | |
| parent | 2de1cd18c05a779b27f68adfb9d60a1277bb6d55 (diff) | |
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
Diffstat (limited to 'internal/http')
| -rw-r--r-- | internal/http/http.go | 4 |
1 files changed, 3 insertions, 1 deletions
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) + } } } } |
