Set Content-Type when handling bad requests
@@ -146,6 +146,7 @@ func (s *Server) SaveConfig(w http.ResponseWriter, r *http.Request) {
}
func (s *Server) handleBadRequest(w http.ResponseWriter, errorMessages []string, session lager.Logger) {
+ w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusBadRequest)
s.writeSaveConfigResponse(w, SaveConfigResponse{
Errors: errorMessages,
