From a727fafd275cd00a8fab1a6c79d8a860bee72417 Mon Sep 17 00:00:00 2001 From: Masahiro Nakagawa Date: Wed, 7 Oct 2020 07:20:03 +0900 Subject: [PATCH] out_http: Don't use destructive method for json_array. fix #3139 Signed-off-by: Masahiro Nakagawa --- lib/fluent/plugin/out_http.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fluent/plugin/out_http.rb b/lib/fluent/plugin/out_http.rb index a5de8701d8..f89736a144 100644 --- a/lib/fluent/plugin/out_http.rb +++ b/lib/fluent/plugin/out_http.rb @@ -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