7a39a3c5 by astaxie

middleware: error page set the content-type

1 parent 428aec1c
...@@ -314,6 +314,7 @@ func Exception(errcode string, w http.ResponseWriter, r *http.Request, msg strin ...@@ -314,6 +314,7 @@ func Exception(errcode string, w http.ResponseWriter, r *http.Request, msg strin
314 if err != nil { 314 if err != nil {
315 isint = 500 315 isint = 500
316 } 316 }
317 w.Header().Set("Content-Type", "text/html; charset=utf-8")
317 w.WriteHeader(isint) 318 w.WriteHeader(isint)
318 h(w, r) 319 h(w, r)
319 return 320 return
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!