cmd/godoc: set Content-Type in fmt handler

Change-Id: I51b12838c65d67d4323e07d70f7c1e66fce23251
Reviewed-on: https://go-review.googlesource.com/14938
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Andrew Gerrand 2015-09-25 12:10:38 +10:00
parent 0f7bc42285
commit 10179a7e86
1 changed files with 1 additions and 0 deletions

View File

@ -141,5 +141,6 @@ func fmtHandler(w http.ResponseWriter, r *http.Request) {
} else { } else {
resp.Body = string(body) resp.Body = string(body)
} }
w.Header().Set("Content-type", "application/json; charset=utf-8")
json.NewEncoder(w).Encode(resp) json.NewEncoder(w).Encode(resp)
} }