From f71ae35f124859d9dade774e17a2e83525a91c52 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 5 May 2021 13:32:05 +0300 Subject: [PATCH] fix content-type override Signed-off-by: Vasiliy Tolstov --- handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler.go b/handler.go index d98f67b..90aab6e 100644 --- a/handler.go +++ b/handler.go @@ -261,14 +261,14 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } + w.Header().Set("Content-Type", ct) + if md, ok := metadata.FromOutgoingContext(ctx); ok { for k, v := range md { w.Header().Set(k, v) } } - w.Header().Set("content-Type", ct) - if nscode := GetRspCode(ctx); nscode != 0 { scode = nscode }