Kouhei Sutou
null+****@clear*****
Mon Jan 26 19:10:05 JST 2015
Kouhei Sutou 2015-01-26 19:10:05 +0900 (Mon, 26 Jan 2015) New Revision: 4a9a730145d3eb15035049b4f105ab3101180b9a https://github.com/groonga/grntest/commit/4a9a730145d3eb15035049b4f105ab3101180b9a Message: http: do nothing for none content type respose Modified files: lib/grntest/executors/http-executor.rb Modified: lib/grntest/executors/http-executor.rb (+5 -5) =================================================================== --- lib/grntest/executors/http-executor.rb 2015-01-26 15:42:57 +0900 (f1ceda9) +++ lib/grntest/executors/http-executor.rb 2015-01-26 19:10:05 +0900 (69cf9e1) @@ -84,25 +84,25 @@ module Grntest http.read_timeout = @read_timeout http.request(request) end - normalize_response_data(response.body) + normalize_response_data(command, response.body) end def send_normal_command(command) url = "http://#{@host}:#{@port}#{command.to_uri_format}" begin open(url, :read_timeout => @read_timeout) do |response| - normalize_response_data(response.read) + normalize_response_data(command, response.read) end rescue OpenURI::HTTPError $!.io.read end end - def normalize_response_data(raw_response_data) - if raw_response_data.empty? + def normalize_response_data(command, raw_response_data) + if raw_response_data.empty? or command.output_type == :none raw_response_data else - "#{raw_response_data.chomp}\n" + "#{raw_response_data}\n" end end end -------------- next part -------------- HTML����������������������������...Descargar