Skip to content

Commit

Permalink
fix(worker): Fix worker HttpResponse header handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjholm committed Jun 27, 2021
1 parent 86769cf commit dc0a937
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion triggers/http_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func FromTriggerResponse(triggerResponse *pb.TriggerResponse) (*HttpResponse, er

if httpContext.GetHeaders() != nil {
for key, val := range httpContext.GetHeaders() {
fasthttpHeader.Add(key, val)
fasthttpHeader.Set(key, val)
}
}

Expand Down
2 changes: 1 addition & 1 deletion worker/faas_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (s *FaasWorker) HandleHttpRequest(trigger *triggers.HttpRequest) (*triggers
fasthttpHeader := &fasthttp.ResponseHeader{}

for key, val := range httpResponse.GetHeaders() {
fasthttpHeader.Add(key, val)
fasthttpHeader.Set(key, val)
}

response := &triggers.HttpResponse{
Expand Down
2 changes: 1 addition & 1 deletion worker/http_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (h *HttpWorker) HandleHttpRequest(trigger *triggers.HttpRequest) (*triggers
}

for key, val := range trigger.Header {
httpRequest.Header.Add(key, val)
httpRequest.Header.Set(key, val)
}

httpRequest.Header.Del("Content-Length")
Expand Down

0 comments on commit dc0a937

Please sign in to comment.