fix(encoding): Use utf-8 in plain/text responses
All checks were successful
/ pre-commit (push) Successful in 1m5s
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:
parent
9107326962
commit
d3b28143ea
1 changed files with 2 additions and 2 deletions
|
@ -130,7 +130,7 @@ type GetNoteHandler struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *GetNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
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"]
|
id := mux.Vars(r)["id"]
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ type GetProtectedNoteHandler struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *GetProtectedNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
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)
|
vars := mux.Vars(r)
|
||||||
id := vars["id"]
|
id := vars["id"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue