Skip to content

Commit

Permalink
remove the case insensitive check for accept header
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-valkov committed Feb 24, 2022
1 parent 291894f commit b3b2bf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prometheus_client/exposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def sample_line(line):
def choose_formatter(accept_header: str) -> Tuple[Callable[[CollectorRegistry], bytes], str]:
accept_header = accept_header or ''
for accepted in accept_header.split(','):
if accepted.split(';')[0].strip().lower() == 'application/openmetrics-text':
if accepted.split(';')[0].strip() == 'application/openmetrics-text':
return (openmetrics.generate_latest,
openmetrics.CONTENT_TYPE_LATEST)
return generate_latest, CONTENT_TYPE_LATEST
Expand Down

0 comments on commit b3b2bf6

Please sign in to comment.