diff --git a/.changelog/18367.txt b/.changelog/18367.txt new file mode 100644 index 0000000000..578cf70918 --- /dev/null +++ b/.changelog/18367.txt @@ -0,0 +1,3 @@ +```release-note:bug +dev-mode: Fix dev mode has new line in responses. Now new line is added only when url has pretty query parameter. +``` diff --git a/agent/http.go b/agent/http.go index 31aaf68c20..200f28c755 100644 --- a/agent/http.go +++ b/agent/http.go @@ -616,7 +616,9 @@ func (s *HTTPHandlers) marshalJSON(req *http.Request, obj interface{}) ([]byte, if err != nil { return nil, err } - buf = append(buf, "\n"...) + if ok { + buf = append(buf, "\n"...) + } return buf, nil }