Skip to content

Commit

Permalink
Specify content encoding on text/plain responses
Browse files Browse the repository at this point in the history
  • Loading branch information
aditsachde authored and AlCutter committed Oct 23, 2024
1 parent ee842b6 commit 8a61298
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/internal/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (s *Server) getCheckpointN(w http.ResponseWriter, r *http.Request) {
http.Error(w, "failed to get checkpoint", httpForCode(status.Code(err)))
return
}
w.Header().Set("Content-Type", "text/plain")
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
if _, err := w.Write(chkpt); err != nil {
glog.Errorf("w.Write(): %v", err)
}
Expand All @@ -112,7 +112,7 @@ func (s *Server) getCheckpointWitness(w http.ResponseWriter, r *http.Request) {
http.Error(w, "failed to get checkpoint", httpForCode(status.Code(err)))
return
}
w.Header().Set("Content-Type", "text/plain")
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
if _, err := w.Write(chkpt); err != nil {
glog.Errorf("w.Write(): %v", err)
}
Expand Down

0 comments on commit 8a61298

Please sign in to comment.