From e0ac068112ca49b6bbae84a46f6c43b2103819e2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 26 Nov 2019 17:44:24 +0200 Subject: [PATCH] app/vmselect/prometheus: fix content-type for `/api/v1/export` responses The correct Content-Type should be `application/stream+json` instead of `application/json` Thanks to Joshua Ryder for pointing to this. --- app/vmselect/prometheus/prometheus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vmselect/prometheus/prometheus.go b/app/vmselect/prometheus/prometheus.go index 87e55f4cce..c388271919 100644 --- a/app/vmselect/prometheus/prometheus.go +++ b/app/vmselect/prometheus/prometheus.go @@ -154,7 +154,7 @@ var exportDuration = metrics.NewSummary(`vm_request_duration_seconds{path="/api/ func exportHandler(at *auth.Token, w http.ResponseWriter, matches []string, start, end int64, format string, deadline netstorage.Deadline) error { writeResponseFunc := WriteExportStdResponse writeLineFunc := WriteExportJSONLine - contentType := "application/json" + contentType := "application/stream+json" if format == "prometheus" { contentType = "text/plain" writeLineFunc = WriteExportPrometheusLine