Skip to content

Commit

Permalink
out_http: Don't use destructive method for json_array. fix #3139
Browse files Browse the repository at this point in the history
Signed-off-by: Masahiro Nakagawa <[email protected]>
  • Loading branch information
repeatedly committed Oct 6, 2020
1 parent 9170665 commit a727faf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/out_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def create_request(chunk, uri)
req.basic_auth(@auth.username, @auth.password)
end
set_headers(req)
req.body = @json_array ? "[#{chunk.read.chop!}]" : chunk.read
req.body = @json_array ? "[#{chunk.read.chop}]" : chunk.read
req
end

Expand Down

0 comments on commit a727faf

Please sign in to comment.