Skip to content

Commit

Permalink
fix: html content-type charset
Browse files Browse the repository at this point in the history
  • Loading branch information
crhntr committed Nov 5, 2024
1 parent b89fae9 commit 7571a24
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bulk-update/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (server *Server) writePage(res http.ResponseWriter, _ *http.Request, name s
http.Error(res, "failed to write page", http.StatusInternalServerError)
return
}
res.Header().Set("content-type", "text/html")
res.Header().Set("content-type", "test/html; charset=utf-8")
res.WriteHeader(status)
_, _ = res.Write(buf.Bytes())
}
2 changes: 1 addition & 1 deletion click-to-edit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (server *Server) writePage(res http.ResponseWriter, req *http.Request, name
return
}

res.Header().Set("content-type", "text/html")
res.Header().Set("content-type", "test/html; charset=utf-8")
res.WriteHeader(status)
_, _ = res.Write(buf.Bytes())
}
Expand Down
2 changes: 1 addition & 1 deletion delete-row/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func main() {
http.Error(res, err.Error(), http.StatusInternalServerError)
return
}
res.Header().Set("content-type", "text/html")
res.Header().Set("content-type", "test/html; charset=utf-8")
res.WriteHeader(http.StatusOK)
_, _ = res.Write(buf.Bytes())
})
Expand Down
2 changes: 1 addition & 1 deletion spreadsheet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (server *server) render(res http.ResponseWriter, _ *http.Request, name stri
return
}
header := res.Header()
header.Set("content-type", "text/html")
header.Set("content-type", "test/html; charset=utf-8")
res.WriteHeader(status)
_, _ = res.Write(buf.Bytes())
}
Expand Down

0 comments on commit 7571a24

Please sign in to comment.