YUKI Hiroshi
null+****@clear*****
Mon Jan 20 14:48:42 JST 2014
YUKI Hiroshi 2014-01-20 14:48:42 +0900 (Mon, 20 Jan 2014) New Revision: 30c4a56062353b9ba60aa4259c4ee7c46487d333 https://github.com/droonga/droonga-client-ruby/commit/30c4a56062353b9ba60aa4259c4ee7c46487d333 Message: Use build_path always Modified files: lib/droonga/client/connection/http.rb Modified: lib/droonga/client/connection/http.rb (+2 -3) =================================================================== --- lib/droonga/client/connection/http.rb 2014-01-20 14:13:05 +0900 (da78efe) +++ lib/droonga/client/connection/http.rb 2014-01-20 14:48:42 +0900 (afc89d4) @@ -125,9 +125,8 @@ module Droonga http.open_timeout = open_timeout http.read_timeout = read_timeout http.start do - path = message["path"] || build_path(message) # we should support not only GET but POST also... - get = Net::HTTP::Get.new(path, build_headers(message)) + get = Net::HTTP::Get.new(build_path(message), build_headers(message)) http.request(get) do |response| yield(response) end @@ -144,7 +143,7 @@ module Droonga def build_path(message) type = message["type"] body = message["body"] || {} - base_path = "/#{type}" + base_path = message["path"] || "/#{type}" if body.empty? base_path else -------------- next part -------------- HTML����������������������������... Download