From c79e75d0c128debf02fa28c1af6e7bd7551793c6 Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Fri, 8 Dec 2017 19:03:36 -0800 Subject: [PATCH] prometheus-node-exporter-lua: respond with HTTP/1.0 also reduce calls to output() Signed-off-by: Etienne Champetier --- .../files/usr/bin/prometheus-node-exporter-lua | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/utils/prometheus-node-exporter-lua/files/usr/bin/prometheus-node-exporter-lua b/utils/prometheus-node-exporter-lua/files/usr/bin/prometheus-node-exporter-lua index fea846926..739881e24 100755 --- a/utils/prometheus-node-exporter-lua/files/usr/bin/prometheus-node-exporter-lua +++ b/utils/prometheus-node-exporter-lua/files/usr/bin/prometheus-node-exporter-lua @@ -327,18 +327,11 @@ end -- Web server-specific functions function http_ok_header() - output("HTTP/1.1 200 OK\r") - output("Server: lua-metrics\r") - output("Content-Type: text/plain; version=0.0.4\r") - output("\r") + output("HTTP/1.0 200 OK\r\nServer: lua-metrics\r\nContent-Type: text/plain; version=0.0.4\r\n\r") end function http_not_found() - output("HTTP/1.1 404 Not Found\r") - output("Server: lua-metrics\r") - output("Content-Type: text/plain\r") - output("\r") - output("ERROR: File Not Found.") + output("HTTP/1.0 404 Not Found\r\nServer: lua-metrics\r\nContent-Type: text/plain\r\n\r\nERROR: File Not Found.") end function serve(request)