Skip to content

Commit

Permalink
Merge pull request #33 from aertje/header_consistency
Browse files Browse the repository at this point in the history
HTTP request header setting consistency fix
  • Loading branch information
aertje authored Apr 19, 2021
2 parents f4f5a49 + 1c0f3db commit 6136ac8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions task.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,11 @@ func dispatch(retry bool, taskState *tasks.Task) int {

// Headers as per https://cloud.google.com/tasks/docs/creating-http-target-tasks#handler
// TODO: optional headers
req.Header.Set("X-CloudTasks-QueueName", headerQueueName)
req.Header.Set("X-CloudTasks-TaskName", headerTaskName)
req.Header.Set("X-CloudTasks-TaskExecutionCount", headerTaskExecutionCount)
req.Header.Set("X-CloudTasks-TaskRetryCount", headerTaskRetryCount)
req.Header.Set("X-CloudTasks-TaskETA", headerTaskETA)
headers["X-CloudTasks-QueueName"] = headerQueueName
headers["X-CloudTasks-TaskName"] = headerTaskName
headers["X-CloudTasks-TaskExecutionCount"] = headerTaskExecutionCount
headers["X-CloudTasks-TaskRetryCount"] = headerTaskRetryCount
headers["X-CloudTasks-TaskETA"] = headerTaskETA
} else if appEngineHTTPRequest != nil {
method := toHTTPMethod(appEngineHTTPRequest.GetHttpMethod())

Expand Down

0 comments on commit 6136ac8

Please sign in to comment.