fix(encoding): Use utf-8 in plain/text responses
All checks were successful
/ pre-commit (push) Successful in 1m5s

Fixes #12.

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2025-08-26 16:20:33 +02:00
parent 9107326962
commit d3b28143ea
Signed by: jriou
GPG key ID: 9A099EDA51316854

View file

@ -130,7 +130,7 @@ type GetNoteHandler struct {
}
func (h *GetNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
id := mux.Vars(r)["id"]
@ -155,7 +155,7 @@ type GetProtectedNoteHandler struct {
}
func (h *GetProtectedNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
vars := mux.Vars(r)
id := vars["id"]