From b6df3b6f67f148a7504b41da995b39b1409c9b96 Mon Sep 17 00:00:00 2001 From: Jonatan Ivanov Date: Thu, 27 Jan 2022 15:37:51 -0800 Subject: [PATCH] Prefer 1.0.0 in the accept header for application/openmetrics-text (#9431) related: https://github.com/prometheus/client_java/issues/702 fixes gh-9430 Signed-off-by: Jonatan Ivanov --- scrape/scrape.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrape/scrape.go b/scrape/scrape.go index 866abdb5f4..361d959568 100644 --- a/scrape/scrape.go +++ b/scrape/scrape.go @@ -748,7 +748,7 @@ type targetScraper struct { var errBodySizeLimit = errors.New("body size limit exceeded") -const acceptHeader = `application/openmetrics-text; version=0.0.1,text/plain;version=0.0.4;q=0.5,*/*;q=0.1` +const acceptHeader = `application/openmetrics-text;version=1.0.0,application/openmetrics-text;version=0.0.1;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1` var UserAgent = fmt.Sprintf("Prometheus/%s", version.Version)