Skip to content

Commit

Permalink
Update http_server.cc (triton-inference-server#4701)
Browse files Browse the repository at this point in the history
Change metrics http content type from "text/plain" to "text/plain; charset=utf-8".
  • Loading branch information
spxcds committed Oct 10, 2022
1 parent 76366af commit d47847c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/http_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ HTTPMetricsServer::Handle(evhtp_request_t* req)
}

evhtp_res res = EVHTP_RES_BADREQ;
evhtp_headers_add_header(
req->headers_out,
evhtp_header_new(kContentTypeHeader, "text/plain; charset=utf-8", 1, 1));

// Call to metric endpoint should not have any trailing string
if (RE2::FullMatch(std::string(req->uri->path->full), api_regex_)) {
Expand Down

0 comments on commit d47847c

Please sign in to comment.