Skip to content

Commit

Permalink
Merge pull request #36 from aertje/header_capitalization
Browse files Browse the repository at this point in the history
Honor X-CloudTasks and X-AppEngine header capitalization
  • Loading branch information
aertje authored Apr 22, 2021
2 parents a43e369 + 9a91d5d commit 37639f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion task.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ func dispatch(retry bool, taskState *tasks.Task) int {
}

for k, v := range headers {
req.Header.Set(k, v)
// Uses a direct set to maintain capitalization
// TODO: figure out a way to test these, as the Go net/http client lib overrides the incoming header capitalization
req.Header[k] = []string{v}
}

resp, err := client.Do(req)
Expand Down

0 comments on commit 37639f6

Please sign in to comment.