From c2489a2a6b45f2792b12d8d261c528dca8faeedd Mon Sep 17 00:00:00 2001 From: absolutelightning Date: Thu, 3 Aug 2023 14:27:55 +0530 Subject: [PATCH 1/2] adding new line only in case of pretty in url not in dev mode --- agent/http.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/http.go b/agent/http.go index 32010c343a6..d5b9cd8d021 100644 --- a/agent/http.go +++ b/agent/http.go @@ -604,7 +604,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 } From daf4cf38fd7dd52b7f19ed916e0bf40928483dfc Mon Sep 17 00:00:00 2001 From: absolutelightning Date: Thu, 3 Aug 2023 14:42:19 +0530 Subject: [PATCH 2/2] change log added --- .changelog/18367.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/18367.txt diff --git a/.changelog/18367.txt b/.changelog/18367.txt new file mode 100644 index 00000000000..578cf709185 --- /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. +```