dtomasgu-fluentd 1.14.7.pre.dev → 1.14.8.pre.dev
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fluent/plugin/out_http.rb +5 -1
- data/lib/fluent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f1cdd4d415540b1659d527eff72312f3f09afa4531bec64d59319c653e3160b
|
4
|
+
data.tar.gz: e1d5556da0395a1e1ed8faf38bb724375714b75dbe6ac3bde471b497f28f9b54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f200fb63c73de5dfe31b28bbdfc7b233230d222e1f65082d044da6e5db461370aabfc8eedb4ec3ad1cfd56e1bc3b08b23cc3c878b329e7f9cc5fe5ee7bfbe410
|
7
|
+
data.tar.gz: 633f3057a68f0065e936d5698fe3f9d0bb29705d41bfbe3f08397ae55a7133f4c74455642f1645b3ee699984714c4a9dae8b2d49aae5ee0d42afba8cd9f2231a
|
@@ -20,6 +20,8 @@ require 'openssl'
|
|
20
20
|
require 'fluent/tls'
|
21
21
|
require 'fluent/plugin/output'
|
22
22
|
require 'fluent/plugin_helper/socket'
|
23
|
+
require 'json/minify'
|
24
|
+
|
23
25
|
|
24
26
|
# patch Net::HTTP to support extra_chain_cert which was added in Ruby feature #9758.
|
25
27
|
# see: https://github.com/ruby/ruby/commit/31af0dafba6d3769d2a39617c0dddedb97883712
|
@@ -49,6 +51,8 @@ module Fluent::Plugin
|
|
49
51
|
config_param :content_type, :string, default: nil
|
50
52
|
desc 'JSON array data format for HTTP request body'
|
51
53
|
config_param :json_array, :bool, default: false
|
54
|
+
desc 'Minify exported json data'
|
55
|
+
config_param :json_minify, :bool, default: false
|
52
56
|
desc 'Additional headers for HTTP request'
|
53
57
|
config_param :headers, :hash, default: nil
|
54
58
|
desc 'Additional placeholder based headers for HTTP request'
|
@@ -242,7 +246,7 @@ module Fluent::Plugin
|
|
242
246
|
set_headers(req, chunk)
|
243
247
|
if @json_minify
|
244
248
|
req.body = JSON.minify(req.body)
|
245
|
-
req.body = @json_array ? JSON.minify(
|
249
|
+
req.body = @json_array ? JSON.generate(JSON.minify([#{chunk.read.chop}])) : chunk.read
|
246
250
|
else
|
247
251
|
req.body = @json_array ? "[#{chunk.read.chop}]" : chunk.read
|
248
252
|
end
|
data/lib/fluent/version.rb
CHANGED