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:
parent
0f7bc42285
commit
10179a7e86
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue