mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 21:15:39 +00:00
ipn/localapi: don't indent status response
Doing indented JSON marshaling results in encoding/json allocating an internal buffer, so even when encoding directly to a writer, it still generates a lot of garbage. Updates tailscale/corp#18514 Signed-off-by: Percy Wegmann <percy@tailscale.com>
This commit is contained in:
parent
512fc0b502
commit
c1029de875
@ -1202,9 +1202,7 @@ func (h *Handler) serveStatus(w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
st = h.b.StatusWithoutPeers()
|
||||
}
|
||||
e := json.NewEncoder(w)
|
||||
e.SetIndent("", "\t")
|
||||
e.Encode(st)
|
||||
json.NewEncoder(w).Encode(st)
|
||||
}
|
||||
|
||||
func (h *Handler) serveDebugPeerEndpointChanges(w http.ResponseWriter, r *http.Request) {
|
||||
|
Loading…
Reference in New Issue
Block a user