YUKI Hiroshi
null+****@clear*****
Thu Jul 17 11:26:50 JST 2014
YUKI Hiroshi 2014-07-17 11:26:50 +0900 (Thu, 17 Jul 2014) New Revision: e48bb55c641ee3a81b70ed522e6728ab6dda7c15 https://github.com/droonga/drnbench/commit/e48bb55c641ee3a81b70ed522e6728ab6dda7c15 Message: Ignroe unsupported HTTP methods Modified files: lib/drnbench/client/http.rb Modified: lib/drnbench/client/http.rb (+5 -0) =================================================================== --- lib/drnbench/client/http.rb 2014-07-17 11:11:59 +0900 (db4444d) +++ lib/drnbench/client/http.rb 2014-07-17 11:26:50 +0900 (343edba) @@ -21,6 +21,8 @@ module Drnbench class HttpClient attr_reader :requests, :results, :wait + SUPPORTED_HTTP_METHODS = ["GET", "POST"] + def initialize(params, config) @requests = params[:requests] @result = params[:result] @@ -62,6 +64,9 @@ module Drnbench request["path"] ||=****@confi*****_path request["method"] ||=****@confi*****_method request["method"] = request["method"].upcase + unless SUPPORTED_HTTP_METHODS.include?(request["method"]) + request["method"] = "GET" + end request end end -------------- next part -------------- HTML����������������������������... 下载