fn: LB runner client header processing fix (#1565)

When LB is processing http headers from flat array representation
in gRPC, it should use http.Header.Add() to grow http headers to
handle header keys with multiple values. Set() overrides the
previous entries.
This commit is contained in:
Tolga Ceylan
2019-10-30 14:14:21 -07:00
committed by GitHub
parent 6502947958
commit bddf5ec2f3

View File

@@ -386,8 +386,8 @@ DataLoop:
span.Annotate([]trace.Attribute{trace.StringAttribute("status", infoMsg)}, "")
log.Debugf(infoMsg)
for _, header := range meta.Http.Headers {
clonedHeaders.Set(header.Key, header.Value)
w.Header().Set(header.Key, header.Value)
clonedHeaders.Add(header.Key, header.Value)
w.Header().Add(header.Key, header.Value)
}
if meta.Http.StatusCode > 0 {
statusCode = meta.Http.StatusCode