From a9c97cfb19204c07e7b03d72ccd897cc24ab8feb Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Sat, 11 Jun 2016 13:15:57 -0700 Subject: [PATCH] Don't require slash for node stats --- api/nodes.go | 2 +- command/agent/http.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/nodes.go b/api/nodes.go index 9913f47ce..9a418c2c5 100644 --- a/api/nodes.go +++ b/api/nodes.go @@ -90,7 +90,7 @@ func (n *Nodes) Stats(nodeID string, q *QueryOptions) (*HostStats, error) { return nil, err } var resp []HostStats - if _, err := client.query("/v1/client/stats/", &resp, nil); err != nil { + if _, err := client.query("/v1/client/stats", &resp, nil); err != nil { return nil, err } diff --git a/command/agent/http.go b/command/agent/http.go index 5b5f6fd51..5d6c42aa0 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -114,7 +114,7 @@ func (s *HTTPServer) registerHandlers(enableDebug bool) { s.mux.HandleFunc("/v1/evaluation/", s.wrap(s.EvalSpecificRequest)) s.mux.HandleFunc("/v1/client/fs/", s.wrap(s.FsRequest)) - s.mux.HandleFunc("/v1/client/stats/", s.wrap(s.ClientStatsRequest)) + s.mux.HandleFunc("/v1/client/stats", s.wrap(s.ClientStatsRequest)) s.mux.HandleFunc("/v1/client/allocation/", s.wrap(s.ClientAllocRequest)) s.mux.HandleFunc("/v1/agent/self", s.wrap(s.AgentSelfRequest))