Skip to content

Commit

Permalink
Merge pull request #238 from haldun/master
Browse files Browse the repository at this point in the history
Setting Content-Type header to application/json in debug
  • Loading branch information
lmineiro committed Dec 16, 2016
2 parents 0a62bcd + 5238fc9 commit c077837
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proxy/debug.go
Expand Up @@ -125,8 +125,11 @@ func convertDebugInfo(d *debugInfo) debugDocument {
}

func dbgResponse(w http.ResponseWriter, d *debugInfo) {
w.Header().Set("Content-Type", "application/json")

doc := convertDebugInfo(d)
enc := json.NewEncoder(w)

if err := enc.Encode(&doc); err != nil {
log.Error("[debug response]", err)
}
Expand Down

0 comments on commit c077837

Please sign in to comment.