Skip to content

scraper: fix UTF-8 scraping header always sent with PrometheusText1.0.0#16061

Merged
ywwg merged 1 commit intoprometheus:mainfrom
matthewhughes-uw:fix-escaping-unconditionally-set
Feb 20, 2025
Merged

scraper: fix UTF-8 scraping header always sent with PrometheusText1.0.0#16061
ywwg merged 1 commit intoprometheus:mainfrom
matthewhughes-uw:fix-escaping-unconditionally-set

Conversation

@matthewhughes-uw
Copy link
Copy Markdown
Contributor

The Accept header should not include escape=allow-utf-8 unless explicitly requested.

Conveniently, there was already a test covering this header's value, it just required updating so it also asserts that this value in the header is not set in the cases we don't expect it to be set. I also converted those tests into table tests to help make failures clearer.

Fixes: #15857

Issue: #15857

The `Accept` header should not include `escape=allow-utf-8` unless
explicitly requested.

Conveniently, there was already a test covering this header's value, it
just required updating so it also asserts that this value in the header
is not set in the cases we don't expect it to be set. I also converted
those tests into table tests to help make failures clearer.

Issue: prometheus#15857
Signed-off-by: Matt Hughes <[email protected]>
@matthewhughes-uw matthewhughes-uw changed the title Fix UTF-8 scraping header always sent with PrometheusText1.0.0 scraper: fix UTF-8 scraping header always sent with PrometheusText1.0.0 Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

escaping=allow-utf-8 set in Accept header when scraping even with metric_name_validation_scheme: legacy with PrometheusText1.0.0

2 participants