diff --git a/appview/pulls/pulls.go b/appview/pulls/pulls.go index 9de0aa15..a6263128 100644 --- a/appview/pulls/pulls.go +++ b/appview/pulls/pulls.go @@ -447,7 +447,7 @@ func (s *Pulls) RepoPullPatchRaw(w http.ResponseWriter, r *http.Request) { } } - w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.Write([]byte(pull.Submissions[roundIdInt].Patch)) } diff --git a/appview/repo/repo.go b/appview/repo/repo.go index 7ac528dc..f1df8643 100644 --- a/appview/repo/repo.go +++ b/appview/repo/repo.go @@ -590,7 +590,7 @@ func (rp *Repo) RepoBlobRaw(w http.ResponseWriter, r *http.Request) { return } - w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Content-Type", "text/plain; charset=utf-8") w.Write([]byte(result.Contents)) return } diff --git a/hook/hook.go b/hook/hook.go index 194b49a1..f43b594a 100644 --- a/hook/hook.go +++ b/hook/hook.go @@ -63,7 +63,7 @@ func postRecieve(ctx context.Context, cmd *cli.Command) error { return fmt.Errorf("failed to create request: %w", err) } - req.Header.Set("Content-Type", "text/plain") + req.Header.Set("Content-Type", "text/plain; charset=utf-8") req.Header.Set("X-Git-Dir", gitDir) req.Header.Set("X-Git-User-Did", userDid) req.Header.Set("X-Git-User-Handle", userHandle) diff --git a/knotserver/handler.go b/knotserver/handler.go index b536c5d1..a7dc849f 100644 --- a/knotserver/handler.go +++ b/knotserver/handler.go @@ -187,6 +187,6 @@ func (h *Handle) Version(w http.ResponseWriter, r *http.Request) { } } - w.Header().Set("Content-Type", "text/plain") + w.Header().Set("Content-Type", "text/plain; charset=utf-8") fmt.Fprintf(w, "knotserver/%s", version) }