write all passed header in response
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
f7ed037633
commit
45670661d0
@ -224,6 +224,12 @@ func (h *httpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if md, ok := metadata.FromOutgoingContext(ctx); ok {
|
||||||
|
for k, v := range md {
|
||||||
|
w.Header().Set(k, v)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
w.Header().Set("content-Type", ct)
|
w.Header().Set("content-Type", ct)
|
||||||
if scode != 0 {
|
if scode != 0 {
|
||||||
w.WriteHeader(scode)
|
w.WriteHeader(scode)
|
||||||
|
Loading…
Reference in New Issue
Block a user