fixup headers
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
95dcdd6025
commit
b89d9fdc5b
@ -115,14 +115,14 @@ func (h *Server) HTTPHandlerFunc(handler interface{}) (http.HandlerFunc, error)
|
|||||||
md["Method"] = r.Method
|
md["Method"] = r.Method
|
||||||
md["URL"] = r.URL.String()
|
md["URL"] = r.URL.String()
|
||||||
md["Proto"] = r.Proto
|
md["Proto"] = r.Proto
|
||||||
md["ContentLength"] = fmt.Sprintf("%d", r.ContentLength)
|
md["Content-Length"] = fmt.Sprintf("%d", r.ContentLength)
|
||||||
md["TransferEncoding"] = strings.Join(r.TransferEncoding, ",")
|
md["Transfer-Encoding"] = strings.Join(r.TransferEncoding, ",")
|
||||||
md["Host"] = r.Host
|
md["Host"] = r.Host
|
||||||
md["RequestURI"] = r.RequestURI
|
md["RequestURI"] = r.RequestURI
|
||||||
if r.TLS != nil {
|
if r.TLS != nil {
|
||||||
md["TLS"] = "true"
|
md["TLS"] = "true"
|
||||||
md["TLS_ALPN"] = r.TLS.NegotiatedProtocol
|
md["TLS-ALPN"] = r.TLS.NegotiatedProtocol
|
||||||
md["TLS_ServerName"] = r.TLS.ServerName
|
md["TLS-ServerName"] = r.TLS.ServerName
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = metadata.NewIncomingContext(ctx, md)
|
ctx = metadata.NewIncomingContext(ctx, md)
|
||||||
|
Loading…
Reference in New Issue
Block a user