fluentd 1.6.1-x64-mingw32 → 1.6.2-x64-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53f0e1fcbe42769db859130cc65d68573214999990006f686b26ddc9fde8bd50
4
- data.tar.gz: c024d98b107ad690bb2375848b1b7342f043967a09779f16ca043bf43fc24843
3
+ metadata.gz: 87303e3a8f368b5f5c7ca75d8cfba43a5fe52e84ff5ff455111bdcc750ea3f8a
4
+ data.tar.gz: b16f78a81686875a87f401471ebeab06bd2d6deb39baf422c823fd9b3ac8cd30
5
5
  SHA512:
6
- metadata.gz: e17dd1c0eb93b91a0d43fc785e62a61db892c2f9c805d5afc29a74b08c19ab9a3a201636a3e5fc7b63b9c6fddc490caa3f4d05f7f5359a5dc1ba92e3e9e631ae
7
- data.tar.gz: 4253c6734fbc94fb5475740751cde64f0a172e0560511c6c8641e1c056dc1ae9c5d71bf05dac6b93e2b7f8f221d991b283e959ed5d09308a0d2151a654c186c8
6
+ metadata.gz: 0a0676a4eef431b603a2c3117fe90f588f544bf53fdc9eece96112fc19ad1179bb6dd4261db783d29b913e48e6f7624e2b524356cd010535bee425664cfbfc5a
7
+ data.tar.gz: 6abb329408250d0dcce520762e68ed8845921f9b15f22383845879c7e4a7754d39a4d94231a7ba54dba620a99bec55fa85e4699d7555e5c2f44110a535b8047a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # v1.6
2
2
 
3
+ ## Release v1.6.2 - 2019/07/11
4
+
5
+ ### Bug fixes
6
+
7
+ * http_server helper: Add title argument to support multiple servers
8
+ https://github.com/fluent/fluentd/pull/2493
9
+
3
10
  ## Release v1.6.1 - 2019/07/10
4
11
 
5
12
  ### Enhancement
@@ -208,7 +208,7 @@ module Fluent::Plugin
208
208
 
209
209
  log.debug "listening monitoring http server on http://#{@bind}:#{@port}/api/plugins for worker#{fluentd_worker_id}"
210
210
  api_handler = APIHandler.new(self)
211
- create_http_server(addr: @bind, port: @port, logger: log, default_app: NotFoundJson) do |serv|
211
+ create_http_server(:in_monitor_http_server_helper, addr: @bind, port: @port, logger: log, default_app: NotFoundJson) do |serv|
212
212
  serv.get('/api/plugins') { |req| api_handler.plugins_ltsv(req) }
213
213
  serv.get('/api/plugins.json') { |req| api_handler.plugins_json(req) }
214
214
  serv.get('/api/config') { |req| api_handler.config_ltsv(req) }
@@ -34,11 +34,12 @@ module Fluent
34
34
  # close : correct stopped threads
35
35
  # terminate: kill thread
36
36
 
37
+ # @param title [Symbol] the thread name. this value should be unique.
37
38
  # @param addr [String] Listen address
38
39
  # @param port [String] Listen port
39
40
  # @param logger [Logger] logger used in this server
40
41
  # @param default_app [Object] This method must have #call.
41
- def create_http_server(addr:, port:, logger:, default_app: nil)
42
+ def create_http_server(title, addr:, port:, logger:, default_app: nil)
42
43
  unless block_given?
43
44
  raise ArgumentError, 'BUG: callback not specified'
44
45
  end
@@ -48,7 +49,7 @@ module Fluent
48
49
  end
49
50
 
50
51
  _block_until_http_server_start do |notify|
51
- thread_create(:plugin_helper_http_server) do
52
+ thread_create(title) do
52
53
  @_http_server.start(notify)
53
54
  end
54
55
  end
@@ -16,6 +16,6 @@
16
16
 
17
17
  module Fluent
18
18
 
19
- VERSION = '1.6.1'
19
+ VERSION = '1.6.2'
20
20
 
21
21
  end
@@ -50,7 +50,8 @@ class HtttpHelperTest < Test::Unit::TestCase
50
50
  %w[get head].each do |n|
51
51
  define_method(n) do |uri, header = {}|
52
52
  url = URI.parse(uri)
53
- req = Net::HTTP.const_get(n.capitalize).new(url, header)
53
+ headers = { 'Content-Type' => 'application/x-www-form-urlencoded/' }.merge(header)
54
+ req = Net::HTTP.const_get(n.capitalize).new(url, headers)
54
55
  Net::HTTP.start(url.host, url.port) do |http|
55
56
  http.request(req)
56
57
  end
@@ -60,7 +61,8 @@ class HtttpHelperTest < Test::Unit::TestCase
60
61
  %w[post put patch delete options trace].each do |n|
61
62
  define_method(n) do |uri, body = '', header = {}|
62
63
  url = URI.parse(uri)
63
- req = Net::HTTP.const_get(n.capitalize).new(url, header)
64
+ headers = { 'Content-Type' => 'application/x-www-form-urlencoded/' }.merge(header)
65
+ req = Net::HTTP.const_get(n.capitalize).new(url, headers)
64
66
  req.body = body
65
67
  Net::HTTP.start(url.host, url.port) do |http|
66
68
  http.request(req)
@@ -71,7 +73,7 @@ class HtttpHelperTest < Test::Unit::TestCase
71
73
  sub_test_case 'Create a HTTP server' do
72
74
  test 'monunt given path' do
73
75
  on_driver do |driver|
74
- driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
76
+ driver.create_http_server(:http_server_helper_test, addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
75
77
  s.get('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello get'] }
76
78
  s.post('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello post'] }
77
79
  s.head('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello head'] }
@@ -106,7 +108,7 @@ class HtttpHelperTest < Test::Unit::TestCase
106
108
 
107
109
  test 'when path does not start with `/` or ends with `/`' do
108
110
  on_driver do |driver|
109
- driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
111
+ driver.create_http_server(:http_server_helper_test, addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
110
112
  s.get('example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello get'] }
111
113
  s.get('/example/hello2/') { [200, { 'Content-Type' => 'text/plain' }, 'hello get'] }
112
114
  end
@@ -121,7 +123,7 @@ class HtttpHelperTest < Test::Unit::TestCase
121
123
 
122
124
  test 'when error raised' do
123
125
  on_driver do |driver|
124
- driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
126
+ driver.create_http_server(:http_server_helper_test, addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
125
127
  s.get('/example/hello') { raise 'error!' }
126
128
  end
127
129
 
@@ -132,7 +134,7 @@ class HtttpHelperTest < Test::Unit::TestCase
132
134
 
133
135
  test 'when path is not found' do
134
136
  on_driver do |driver|
135
- driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
137
+ driver.create_http_server(:http_server_helper_test, addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
136
138
  s.get('/example/hello') { [200, { 'Content-Type' => 'text/plain' }, 'hello get'] }
137
139
  end
138
140
 
@@ -143,7 +145,7 @@ class HtttpHelperTest < Test::Unit::TestCase
143
145
 
144
146
  test 'params and body' do
145
147
  on_driver do |driver|
146
- driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
148
+ driver.create_http_server(:http_server_helper_test, addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do |s|
147
149
  s.get('/example/hello') do |req|
148
150
  assert_equal(req.query_string, nil)
149
151
  assert_equal(req.body, nil)
@@ -193,7 +195,7 @@ class HtttpHelperTest < Test::Unit::TestCase
193
195
  end
194
196
 
195
197
  stub(Fluent::PluginHelper::HttpServer::Server).new(anything) { server }
196
- driver.create_http_server(addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do
198
+ driver.create_http_server(:http_server_helper_test, addr: '127.0.0.1', port: PORT, logger: NULL_LOGGER) do
197
199
  # nothing
198
200
  end
199
201
  driver.stop
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-11 00:00:00.000000000 Z
11
+ date: 2019-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack