create outgoing metadata automatic on request
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
dace6eef67
commit
7ec7aadfbf
@ -382,6 +382,7 @@ func (h *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
md["Host"] = r.Host
|
md["Host"] = r.Host
|
||||||
md["RequestURI"] = r.RequestURI
|
md["RequestURI"] = r.RequestURI
|
||||||
ctx = metadata.NewIncomingContext(ctx, md)
|
ctx = metadata.NewIncomingContext(ctx, md)
|
||||||
|
ctx = metadata.NewOutgoingContext(ctx, metadata.New(0))
|
||||||
|
|
||||||
path := r.URL.Path
|
path := r.URL.Path
|
||||||
if !strings.HasPrefix(path, "/") {
|
if !strings.HasPrefix(path, "/") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user