middleware: error page set the content-type
Showing
1 changed file
with
1 additions
and
0 deletions
| ... | @@ -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 | ... | ... |
-
Please register or sign in to post a comment