Yoji Shidara
null+****@clear*****
Wed Oct 16 17:02:37 JST 2013
Yoji Shidara 2013-10-16 17:02:37 +0900 (Wed, 16 Oct 2013) New Revision: 57f972f094e8ab08b85b6198053e1fb0f842a565 https://github.com/droonga/fluent-plugin-droonga/commit/57f972f094e8ab08b85b6198053e1fb0f842a565 Message: Downcase envelope key: From -> from Modified files: lib/droonga/plugin/handler_watch.rb test/plugin/handler/test_handler_watch.rb Modified: lib/droonga/plugin/handler_watch.rb (+1 -1) =================================================================== --- lib/droonga/plugin/handler_watch.rb 2013-10-16 15:13:30 +0900 (068af41) +++ lib/droonga/plugin/handler_watch.rb 2013-10-16 17:02:37 +0900 (65d9245) @@ -80,7 +80,7 @@ module Droonga def parse_request(request) subscriber = request["subscriber"] condition = request["condition"] - route = request["route"] || envelope["From"] + route = request["route"] || envelope["from"] raise "invalid request" if subscriber.nil? || subscriber.empty? || condition.nil? query = condition.to_json raise "too long query" if query.size > 4095 Modified: test/plugin/handler/test_handler_watch.rb (+2 -2) =================================================================== --- test/plugin/handler/test_handler_watch.rb 2013-10-16 15:13:30 +0900 (55962e3) +++ test/plugin/handler/test_handler_watch.rb 2013-10-16 17:02:37 +0900 (145962d) @@ -103,7 +103,7 @@ class WatchHandlerTest < Test::Unit::TestCase "condition" => "たいやき", "subscriber" => "localhost" } - @worker.envelope["From"] = "localhost:23004/output" + @worker.envelope["from"] = "localhost:23004/output" mock(@handler).emit([true]) @handler.subscribe(request) @@ -119,7 +119,7 @@ class WatchHandlerTest < Test::Unit::TestCase "subscriber" => "localhost", "route" => "localhost:23003/output" } - @worker.envelope["From"] = "localhost:23004/output" + @worker.envelope["from"] = "localhost:23004/output" mock(@handler).emit([true]) @handler.subscribe(request) -------------- next part -------------- HTML����������������������������...Download