From b30ca8b31e23ea9f518c92e2ef51f85d8e7a0584 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Fri, 26 Apr 2013 17:03:01 +0300 Subject: Fix: telnet exceptions, broken json/ext, typo Kudos to Samer Abdel-Hafez for noticing --- lib/oxidized/api/rest.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/api/rest.rb') diff --git a/lib/oxidized/api/rest.rb b/lib/oxidized/api/rest.rb index 9e00837..783b445 100644 --- a/lib/oxidized/api/rest.rb +++ b/lib/oxidized/api/rest.rb @@ -5,6 +5,7 @@ module Oxidized class Rest module Helpers def send res, msg='OK', status=200 + msg = {:result => msg} res['Content-Type'] = 'application/json' res.status = status res.body = JSON.dump msg @@ -15,7 +16,7 @@ module Oxidized @nodes = nodes addr, port = listen.to_s.split ':' port, addr = addr, nil if not port - @web = WEBrick::HTTPServer.new :BindAddress=>addr, :Port=>port, :Logger=>Log + @web = WEBrick::HTTPServer.new :BindAddress=>addr, :Port=>port, :Logger=>Log, :AccessLog=>[] maps end def work -- cgit v1.2.1