Permalink
Browse files

Set charset=utf-8 in POST /action/new-repo handler.

For consistency with other places where Content-Type header is set
to "text/plain; charset=utf-8".
  • Loading branch information...
dmitshur committed Dec 22, 2018
1 parent 3ad91d1 commit 2ed0895ba03c63267e82479c8cb44ed097e73345
Showing with 1 addition and 1 deletion.
  1. +1 −1 action.go
@@ -47,7 +47,7 @@ func initAction(code *code.Service, users users.Service) {

createRepoError := code.CreateRepo(req.Context(), repoSpec, repoDescription)

w.Header().Set("Content-Type", "text/plain")
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
fmt.Fprintf(io.MultiWriter(os.Stdout, w), "creating new repo: spec=%q description=%q: err=%v\n", repoSpec, repoDescription, createRepoError)

return nil

0 comments on commit 2ed0895

Please sign in to comment.