1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-29 14:01:29 +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 { if err != nil {
isint = 500 isint = 500
} }
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.WriteHeader(isint) w.WriteHeader(isint)
h(w, r) h(w, r)
return return