Kouhei Sutou
null+****@clear*****
Fri Aug 19 16:16:12 JST 2016
Kouhei Sutou 2016-08-19 16:16:12 +0900 (Fri, 19 Aug 2016) New Revision: 2484e275cd65d4d4a8659e3ea2f3c179f6a06eff https://github.com/ranguba/groonga-client/commit/2484e275cd65d4d4a8659e3ea2f3c179f6a06eff Message: http: add :chunk option Modified files: lib/groonga/client/protocol/http/synchronous.rb Modified: lib/groonga/client/protocol/http/synchronous.rb (+5 -1) =================================================================== --- lib/groonga/client/protocol/http/synchronous.rb 2016-06-17 11:08:41 +0900 (136bcea) +++ lib/groonga/client/protocol/http/synchronous.rb 2016-08-19 16:16:12 +0900 (34a4d54) @@ -126,7 +126,11 @@ module Groonga command[:values] = raw_values request = Net::HTTP::Post.new(path, headers) request.content_type = "application/json" - request.content_length = raw_values.bytesize + if @options[:chunk] + request["Transfer-Encoding"] = "chunked" + else + request.content_length = raw_values.bytesize + end request.body_stream = StringIO.new(raw_values) else path = resolve_path(@url, command.to_uri_format) -------------- next part -------------- HTML����������������������������... Download