1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-26 12:10:49 +00:00

middleware: error page set the content-type

This commit is contained in:
astaxie 2014-08-01 16:46:49 +08:00
parent 428aec1c24
commit 7a39a3c52f

View File

@ -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