You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In transport/http/server.go i have found 2 places where the headers are not correctly set to all values the http.Header might be holding.
http.Header is a map[string][]string and .Get(k) only returns the first of those fields from the []string array. I think to correctly handle it, we should do as the docs suggest:
// Get gets the first value associated with the given key.
// It is case insensitive; textproto.CanonicalMIMEHeaderKey is used
// to canonicalize the provided key.
// If there are no values associated with the key, Get returns "".
// To access multiple values of a key, or to use non-canonical keys,
// access the map directly.
func (h Header) Get(key string) string {
return textproto.MIMEHeader(h).Get(key)
}
which would be sthg along the lines ...
for k,hdrs := range headerer.Headers() {
for _,h := range hdrs {
w.Header().Add(k, h))
}
}
In
transport/http/server.go
i have found 2 places where the headers are not correctly set to all values the http.Header might be holding.http.Header is a
map[string][]string
and.Get(k)
only returns the first of those fields from the []string array. I think to correctly handle it, we should do as the docs suggest:which would be sthg along the lines ...
kit/transport/http/server.go
Line 148 in 1b4cf21
The text was updated successfully, but these errors were encountered: