From d7f8852e0508fe7caf32bc17dc568aac4f11bc5d Mon Sep 17 00:00:00 2001 From: beorn7 Date: Mon, 19 Mar 2018 14:04:12 +0100 Subject: [PATCH] Fix TestHandler prometheus/common has changed and now adds the charset to the Content-Type header. --- prometheus/registry_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/prometheus/registry_test.go b/prometheus/registry_test.go index d136bba..653df4f 100644 --- a/prometheus/registry_test.go +++ b/prometheus/registry_test.go @@ -254,7 +254,7 @@ collected metric's label constname is not utf8: "\xff" }, out: output{ headers: map[string]string{ - "Content-Type": `text/plain; version=0.0.4`, + "Content-Type": `text/plain; version=0.0.4; charset=utf-8`, }, body: []byte{}, }, @@ -265,7 +265,7 @@ collected metric's label constname is not utf8: "\xff" }, out: output{ headers: map[string]string{ - "Content-Type": `text/plain; version=0.0.4`, + "Content-Type": `text/plain; version=0.0.4; charset=utf-8`, }, body: []byte{}, }, @@ -276,7 +276,7 @@ collected metric's label constname is not utf8: "\xff" }, out: output{ headers: map[string]string{ - "Content-Type": `text/plain; version=0.0.4`, + "Content-Type": `text/plain; version=0.0.4; charset=utf-8`, }, body: []byte{}, }, @@ -298,7 +298,7 @@ collected metric's label constname is not utf8: "\xff" }, out: output{ headers: map[string]string{ - "Content-Type": `text/plain; version=0.0.4`, + "Content-Type": `text/plain; version=0.0.4; charset=utf-8`, }, body: expectedMetricFamilyAsText, }, @@ -322,7 +322,7 @@ collected metric's label constname is not utf8: "\xff" }, out: output{ headers: map[string]string{ - "Content-Type": `text/plain; version=0.0.4`, + "Content-Type": `text/plain; version=0.0.4; charset=utf-8`, }, body: externalMetricFamilyAsText, }, @@ -365,7 +365,7 @@ collected metric's label constname is not utf8: "\xff" }, out: output{ headers: map[string]string{ - "Content-Type": `text/plain; version=0.0.4`, + "Content-Type": `text/plain; version=0.0.4; charset=utf-8`, }, body: []byte{}, }, @@ -376,7 +376,7 @@ collected metric's label constname is not utf8: "\xff" }, out: output{ headers: map[string]string{ - "Content-Type": `text/plain; version=0.0.4`, + "Content-Type": `text/plain; version=0.0.4; charset=utf-8`, }, body: expectedMetricFamilyAsText, }, @@ -388,7 +388,7 @@ collected metric's label constname is not utf8: "\xff" }, out: output{ headers: map[string]string{ - "Content-Type": `text/plain; version=0.0.4`, + "Content-Type": `text/plain; version=0.0.4; charset=utf-8`, }, body: bytes.Join( [][]byte{