From 6c3aaa81c1e049fc3f24f084b9b921432acf263b Mon Sep 17 00:00:00 2001 From: Eric Connell Date: Fri, 1 Aug 2014 14:28:46 -0600 Subject: [PATCH] modified so ?pretty=anything will work --- command/agent/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command/agent/http.go b/command/agent/http.go index cc37b2db9..a254ecf19 100644 --- a/command/agent/http.go +++ b/command/agent/http.go @@ -138,13 +138,13 @@ func (s *HTTPServer) wrap(handler func(resp http.ResponseWriter, req *http.Reque } prettyPrint := false - if req.URL.Query().Get("pretty") == "true" { + if req.URL.Query().Get("pretty") != "" { prettyPrint = true } // Write out the JSON object if obj != nil { var buf []byte - if prettyPrint == true { + if prettyPrint { buf, err = json.MarshalIndent(obj, "", " ") } else { buf, err = json.Marshal(obj)