Skip to content

Commit

Permalink
Merge pull request #99 from cmfatih/master
Browse files Browse the repository at this point in the history
Add Content-Type to monitoring handlers
  • Loading branch information
derekcollison committed Aug 12, 2015
2 parents 4e890ea + 48ea38e commit 5e1a582
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ func (s *Server) HandleConnz(w http.ResponseWriter, r *http.Request) {
if err != nil {
Errorf("Error marshalling response to /connz request: %v", err)
}
w.Header().Set("Content-Type", "application/json")
w.Write(b)
}

Expand Down Expand Up @@ -219,6 +220,7 @@ func (s *Server) HandleRoutez(w http.ResponseWriter, r *http.Request) {
if err != nil {
Errorf("Error marshalling response to /routez request: %v", err)
}
w.Header().Set("Content-Type", "application/json")
w.Write(b)
}

Expand All @@ -230,6 +232,7 @@ func (s *Server) HandleSubsz(w http.ResponseWriter, r *http.Request) {
if err != nil {
Errorf("Error marshalling response to /subscriptionsz request: %v", err)
}
w.Header().Set("Content-Type", "application/json")
w.Write(b)
}

Expand Down Expand Up @@ -319,6 +322,7 @@ func (s *Server) HandleVarz(w http.ResponseWriter, r *http.Request) {
if err != nil {
Errorf("Error marshalling response to /varz request: %v", err)
}
w.Header().Set("Content-Type", "application/json")
w.Write(b)
}

Expand Down

0 comments on commit 5e1a582

Please sign in to comment.