fix content-type override

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-05-05 13:32:05 +03:00
parent 4d27c79081
commit f71ae35f12

View File

@ -261,14 +261,14 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return return
} }
w.Header().Set("Content-Type", ct)
if md, ok := metadata.FromOutgoingContext(ctx); ok { if md, ok := metadata.FromOutgoingContext(ctx); ok {
for k, v := range md { for k, v := range md {
w.Header().Set(k, v) w.Header().Set(k, v)
} }
} }
w.Header().Set("content-Type", ct)
if nscode := GetRspCode(ctx); nscode != 0 { if nscode := GetRspCode(ctx); nscode != 0 {
scode = nscode scode = nscode
} }