Navigation Menu

Skip to content

Commit

Permalink
http: use stream to send POST data
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 20, 2015
1 parent 17516f9 commit 593c589
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/groonga/client/protocol/http/synchronous.rb
Expand Up @@ -97,7 +97,8 @@ def send_request(http, command)
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)
Expand Down

0 comments on commit 593c589

Please sign in to comment.