mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
add charset on targets response (#897)
This commit is contained in:
parent
f7a6ae3d11
commit
64e99744f1
1 changed files with 2 additions and 2 deletions
|
@ -208,13 +208,13 @@ func requestHandler(w http.ResponseWriter, r *http.Request) bool {
|
||||||
return true
|
return true
|
||||||
case "/targets":
|
case "/targets":
|
||||||
promscrapeTargetsRequests.Inc()
|
promscrapeTargetsRequests.Inc()
|
||||||
w.Header().Set("Content-Type", "text/plain")
|
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||||
showOriginalLabels, _ := strconv.ParseBool(r.FormValue("show_original_labels"))
|
showOriginalLabels, _ := strconv.ParseBool(r.FormValue("show_original_labels"))
|
||||||
promscrape.WriteHumanReadableTargetsStatus(w, showOriginalLabels)
|
promscrape.WriteHumanReadableTargetsStatus(w, showOriginalLabels)
|
||||||
return true
|
return true
|
||||||
case "/api/v1/targets":
|
case "/api/v1/targets":
|
||||||
promscrapeAPIV1TargetsRequests.Inc()
|
promscrapeAPIV1TargetsRequests.Inc()
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||||
state := r.FormValue("state")
|
state := r.FormValue("state")
|
||||||
promscrape.WriteAPIV1Targets(w, state)
|
promscrape.WriteAPIV1Targets(w, state)
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in a new issue