Skip to content

Commit

Permalink
Fix #17730 - Dev mode has new line (#18367)
Browse files Browse the repository at this point in the history
* adding new line only in case of pretty in url not in dev mode

* change log added
  • Loading branch information
absolutelightning authored Aug 5, 2023
1 parent 38c356c commit 417ae9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/18367.txt
Original file line number Diff line number Diff line change
@@ -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.
```
4 changes: 3 additions & 1 deletion agent/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 417ae9f

Please sign in to comment.