fluent-plugin-out-http 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9cae817126fdb00912368dea2552ab2fe2fb2b0034c056675ff5a202345a599e
4
- data.tar.gz: d77eadf2e866560cab71071619ad7b16dfd7aa9795fefce92f313b2cdf8c4a94
3
+ metadata.gz: ad31d6d8e6d5c91ed3d8de4001209423ac88ab0b4874ff20ca2ad6fc4da1eb61
4
+ data.tar.gz: 5b51d999c640acc0e8bdae3dc4f057648ccbb76bcc79e8b10d96dfacf5ea7c8f
5
5
  SHA512:
6
- metadata.gz: 46844c53ac9a7f508dda03612a77a897d8571f40b9ed3a59c341f008ad3c75bfcad7049692daa910f75210e878aaae0555ec392ffd57e3c95ce37a60e8ec8dbb
7
- data.tar.gz: 817925c2db4173645f854ac1478b0ddd861dc7907b2919a8f24c6f8b5ffcba1d044a574eaf00e7ffc314d91d54ca37131e4633c763b63d0d971b0879f52e9099
6
+ metadata.gz: c26560e9256fdd166b1a909b5b166c5fe5a7d14f5b9ebc01c8a125bd74c6feb859ee744853a3e3925e7ad6e58175c3be7e45d991eca54716f1a62d10981fad5b
7
+ data.tar.gz: acb1c8e0131912640da47d2e632f91cd7c4986327878a60ea224905c52eb4d545e5e1d8cab6c2abe22a3030764733d9dba22ba6443845319c4850f7bf150407b
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.3.2
4
+ * Fix invalid x-ndjson payload format
5
+
3
6
  ## 1.3.1
4
7
  * Support compression request
5
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "fluent-plugin-out-http"
5
- gem.version = "1.3.1"
5
+ gem.version = "1.3.2"
6
6
  gem.authors = ["Marica Odagaki"]
7
7
  gem.email = ["ento.entotto@gmail.com"]
8
8
  gem.summary = %q{A generic Fluentd output plugin to send logs to an HTTP endpoint}
@@ -174,7 +174,7 @@ class Fluent::Plugin::HTTPOutput < Fluent::Plugin::Output
174
174
  end
175
175
 
176
176
  def set_bulk_body(req, data)
177
- req.body = data.to_s
177
+ req.body = Yajl.dump(data)
178
178
  req['Content-Type'] = 'application/x-ndjson'
179
179
  compress_body(req, req.body)
180
180
  end
@@ -471,21 +471,21 @@ class HTTPOutputTest < HTTPOutputTestBase
471
471
  assert_equal 1, @posts.size
472
472
  record = @posts[0]
473
473
 
474
- expected =[
475
- {
476
- "binary" => "\u3042",
474
+ expected = [
475
+ Yajl.dump({
477
476
  "field1" => 50,
478
477
  "field2" => 20,
479
478
  "field3" => 10,
480
- "otherfield" => 1
481
- },
482
- {
479
+ "otherfield" => 1,
483
480
  "binary" => "\u3042",
481
+ }) + "\n" +
482
+ Yajl.dump({
484
483
  "field1" => 70,
485
484
  "field2" => 30,
486
485
  "field3" => 20,
487
- "otherfield" => 2
488
- }
486
+ "otherfield" => 2,
487
+ "binary" => "\u3042",
488
+ }) + "\n"
489
489
  ]
490
490
 
491
491
  assert_equal expected, record[:x_ndjson]
@@ -503,21 +503,21 @@ class HTTPOutputTest < HTTPOutputTestBase
503
503
  assert_equal 1, @posts.size
504
504
  record = @posts[0]
505
505
 
506
- expected =[
507
- {
508
- "binary" => "\u3042",
506
+ expected = [
507
+ Yajl.dump({
509
508
  "field1" => 50,
510
509
  "field2" => 20,
511
510
  "field3" => 10,
512
- "otherfield" => 1
513
- },
514
- {
511
+ "otherfield" => 1,
515
512
  "binary" => "\u3042",
513
+ }) + "\n" +
514
+ Yajl.dump({
516
515
  "field1" => 70,
517
516
  "field2" => 30,
518
517
  "field3" => 20,
519
- "otherfield" => 2
520
- }
518
+ "otherfield" => 2,
519
+ "binary" => "\u3042",
520
+ }) + "\n"
521
521
  ]
522
522
 
523
523
  assert_equal expected, record[:x_ndjson]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-out-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marica Odagaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-09 00:00:00.000000000 Z
11
+ date: 2019-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubygems_version: 3.0.1
128
+ rubygems_version: 3.0.3
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: A generic Fluentd output plugin to send logs to an HTTP endpoint