From 554f6852d3760a3a2c75c66c38c00c6bb343e5a9 Mon Sep 17 00:00:00 2001 From: Bernd Date: Sun, 28 Sep 2014 04:44:37 +0200 Subject: [PATCH] Avoid static file corruption (small.png) on Windows When using `logstash web` on Windows the Kibana Logo on the dashboard is broken. This is because it will return small.png with 479 instead of 480 bytes (removing a 0x0d). Fixes #1796 --- lib/logstash/kibana.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logstash/kibana.rb b/lib/logstash/kibana.rb index dc7cebf66..e79eafaa6 100644 --- a/lib/logstash/kibana.rb +++ b/lib/logstash/kibana.rb @@ -42,7 +42,7 @@ module LogStash::Kibana if File.exists?(path) ext = path.split(".").last content_type MIME::Types.type_for(ext).first.to_s - body File.new(path, "r").read + body File.new(path, "rb").read else status 404 content_type "text/plain"