From 8fac2d8d58474812affd5ab10c088a4d0b90f4c7 Mon Sep 17 00:00:00 2001 From: Amine KABAB Date: Wed, 14 Dec 2016 17:19:31 +0000 Subject: [PATCH] Don't rewrite content-type --- controller.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controller.go b/controller.go index e484ce49..a6fbdd23 100644 --- a/controller.go +++ b/controller.go @@ -185,7 +185,11 @@ func (c *Controller) Render() error { if err != nil { return err } - c.Ctx.Output.Header("Content-Type", "text/html; charset=utf-8") + + if c.Ctx.ResponseWriter.Header().Get("Content-Type") == "" { + c.Ctx.Output.Header("Content-Type", "text/html; charset=utf-8") + } + return c.Ctx.Output.Body(rb) }