Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Content-Type header to promhttp #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dsmeytis
Copy link

Hello,
Monitoring service (i.e. DataDog) gives an error in attempt to gather metrics exposed by promhttp because it doesn't put any Content-Type header into HTTP response. This small change includes Content-Type text/plain to the responses in order to fix this problem.
Thanks for your attention.

@dsmeytis dsmeytis requested a review from a team as a code owner April 23, 2021 09:00
@xmcqueen
Copy link

xmcqueen commented May 6, 2021

Looks good to me.

@@ -19,6 +19,8 @@
#include "microhttpd.h"
#include "prom.h"

#define MIMETYPE_TEXT_PLAIN "text/plain"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text/plain; version=0.0.4; charset=utf-8 is the correct value for this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

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.

3 participants