[Groonga-commit] ranguba/groonga-client at 593c589 [master] http: use stream to send POST data

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Apr 20 15:03:16 JST 2015


Kouhei Sutou	2015-04-20 15:03:16 +0900 (Mon, 20 Apr 2015)

  New Revision: 593c5897d276ceb1e464980a741b20bfbfe1fd3b
  https://github.com/ranguba/groonga-client/commit/593c5897d276ceb1e464980a741b20bfbfe1fd3b

  Message:
    http: use stream to send POST data

  Modified files:
    lib/groonga/client/protocol/http/synchronous.rb

  Modified: lib/groonga/client/protocol/http/synchronous.rb (+2 -1)
===================================================================
--- lib/groonga/client/protocol/http/synchronous.rb    2015-04-15 18:07:11 +0900 (6f12c48)
+++ lib/groonga/client/protocol/http/synchronous.rb    2015-04-20 15:03:16 +0900 (a3a19db)
@@ -97,7 +97,8 @@ module Groonga
               command[:values] = raw_values
               request = Net::HTTP::Post.new(path, headers)
               request.content_type = "application/json"
-              request.body = raw_values
+              request.content_length = raw_values.bytesize
+              request.body_stream = StringIO.new(raw_values)
               http.request(request)
             else
               http.get(command.to_uri_format, headers)
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index