diff --git a/cmd/godoc/handlers.go b/cmd/godoc/handlers.go index 37dc7db3..dda1bb87 100644 --- a/cmd/godoc/handlers.go +++ b/cmd/godoc/handlers.go @@ -141,5 +141,6 @@ func fmtHandler(w http.ResponseWriter, r *http.Request) { } else { resp.Body = string(body) } + w.Header().Set("Content-type", "application/json; charset=utf-8") json.NewEncoder(w).Encode(resp) }