errorCatcher: set Content-Type authoritatively
Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
809186ec09
commit
edd3bd1c49
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ func (ec *errorCatcher) WriteHeader(statusCode int) {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
ec.res.Header().Add("content-type", "text/html")
|
||||
ec.res.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
ec.res.WriteHeader(statusCode)
|
||||
ec.res.Write([]byte(page))
|
||||
ec.handledError = true
|
||||
|
@ -63,7 +63,7 @@ func (ec *errorCatcher) WriteHeader(statusCode int) {
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
ec.res.Header().Add("content-type", "text/html")
|
||||
ec.res.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
ec.res.WriteHeader(statusCode)
|
||||
ec.res.Write([]byte(page))
|
||||
ec.handledError = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue