diff options
| author | Tom DNetto <tom@tailscale.com> | 2024-02-09 11:49:23 -0800 |
|---|---|---|
| committer | Tom DNetto <tom@tailscale.com> | 2024-02-20 11:29:42 -0800 |
| commit | 4436a79f46784d206dca3276067a05e543127c7a (patch) | |
| tree | 8bde71d6ab249a406ab53b7264402d251e8b6779 | |
| parent | 8fe504241d6e73f7188cec8841ce8d5cf03843b6 (diff) | |
| download | tailscale-tom/tka4.tar.xz tailscale-tom/tka4.zip | |
tsweb: set charset when exporting vars to prometheustom/tka4
Appears to be safe based on: https://github.com/prometheus/common/pull/119
Signed-off-by: Tom DNetto <tom@tailscale.com>
Updates: corp#17075
| -rw-r--r-- | tsweb/varz/varz.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tsweb/varz/varz.go b/tsweb/varz/varz.go index 15a3be551..9e8b3717d 100644 --- a/tsweb/varz/varz.go +++ b/tsweb/varz/varz.go @@ -240,7 +240,7 @@ type sortedKVs struct { // // This will evolve over time, or perhaps be replaced. func Handler(w http.ResponseWriter, r *http.Request) { - w.Header().Set("Content-Type", "text/plain; version=0.0.4") + w.Header().Set("Content-Type", "text/plain; version=0.0.4; charset=utf-8") s := sortedKVsPool.Get().(*sortedKVs) defer sortedKVsPool.Put(s) |
