From 7a39a3c52ffac33e63c1272f5a7dc11e89b68500 Mon Sep 17 00:00:00 2001 From: astaxie Date: Fri, 1 Aug 2014 16:46:49 +0800 Subject: [PATCH] middleware: error page set the content-type --- middleware/error.go | 1 + 1 file changed, 1 insertion(+) diff --git a/middleware/error.go b/middleware/error.go index 743180cb..49ed1673 100644 --- a/middleware/error.go +++ b/middleware/error.go @@ -314,6 +314,7 @@ func Exception(errcode string, w http.ResponseWriter, r *http.Request, msg strin if err != nil { isint = 500 } + w.Header().Set("Content-Type", "text/html; charset=utf-8") w.WriteHeader(isint) h(w, r) return