From a0cb60840f3f5e0ff6845b20c68aa546e179b63c Mon Sep 17 00:00:00 2001 From: ncohensm Date: Wed, 22 Jun 2016 15:55:59 -0700 Subject: [PATCH] set response headers for query endpoint --- plugins/inputs/http_listener/http_listener.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/inputs/http_listener/http_listener.go b/plugins/inputs/http_listener/http_listener.go index a789cf304..9d8f7582c 100644 --- a/plugins/inputs/http_listener/http_listener.go +++ b/plugins/inputs/http_listener/http_listener.go @@ -127,6 +127,8 @@ func (t *HttpListener) ServeHTTP(res http.ResponseWriter, req *http.Request) { } else if path == "query" { // Deliver a dummy response to the query endpoint, as some InfluxDB clients test endpoint availability with a query log.Printf("Received query request: [%s]\n", string(body)) + res.Header().Set("Content-Type", "application/json") + res.Header().Set("X-Influxdb-Version", "1.0") res.WriteHeader(200) res.Write([]byte("{\"results\":[]}")) } else {