fluentd 0.12.34 → 0.12.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fluentd might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/ChangeLog +9 -0
- data/lib/fluent/plugin/in_http.rb +2 -0
- data/lib/fluent/plugin/in_tail.rb +5 -2
- data/lib/fluent/version.rb +1 -1
- data/test/plugin/test_in_http.rb +29 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2d3102f961d9f56eeac91f42b95c2599067c951
|
4
|
+
data.tar.gz: 5f86c48d0a436f06e8f7c4b2b017e6b301041bae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b34637aa560ca457b313f9caf63f5fa8df8fa79398a876efa24299e3f7537719e03c745a5bc302f04f78975a81e6e5b959b4f5867c684cdf8bdf057aef37137d
|
7
|
+
data.tar.gz: 01b2bec5a9948f4a10e12f66bbe2b91427dfb6127834a9dfba8bf0ba8b28e10a39a1e1dd6dad1241b18a781b640cb03aff2924cd9713956e2f2fc6e87831fd5f
|
data/ChangeLog
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# v0.12
|
2
2
|
|
3
|
+
## Release 0.12.35 - 2017/04/19
|
4
|
+
|
5
|
+
### Bug fixes
|
6
|
+
|
7
|
+
* in_http: Fix X-Forwarded-For header handling. Accpet multiple headers
|
8
|
+
https://github.com/fluent/fluentd/pull/1535
|
9
|
+
* in_tail: Do not warn that directories are unreadable
|
10
|
+
https://github.com/fluent/fluentd/pull/1540
|
11
|
+
|
3
12
|
## Release 0.12.34 - 2017/03/25
|
4
13
|
|
5
14
|
### New features / Enhancement
|
@@ -157,14 +157,17 @@ module Fluent
|
|
157
157
|
path = date.strftime(path)
|
158
158
|
if path.include?('*')
|
159
159
|
paths += Dir.glob(path).select { |p|
|
160
|
-
|
160
|
+
is_file = !File.directory?(p)
|
161
|
+
if File.readable?(p) && is_file
|
161
162
|
if @limit_recently_modified && File.mtime(p) < (date - @limit_recently_modified)
|
162
163
|
false
|
163
164
|
else
|
164
165
|
true
|
165
166
|
end
|
166
167
|
else
|
167
|
-
|
168
|
+
if is_file
|
169
|
+
log.warn "#{p} unreadable. It is excluded and would be examined next time."
|
170
|
+
end
|
168
171
|
false
|
169
172
|
end
|
170
173
|
}
|
data/lib/fluent/version.rb
CHANGED
data/test/plugin/test_in_http.rb
CHANGED
@@ -152,6 +152,33 @@ class HttpInputTest < Test::Unit::TestCase
|
|
152
152
|
|
153
153
|
end
|
154
154
|
|
155
|
+
def test_add_remote_addr_given_multi_x_forwarded_for
|
156
|
+
d = create_driver(CONFIG + "add_remote_addr true")
|
157
|
+
|
158
|
+
tag = "tag1"
|
159
|
+
time = event_time("2011-01-02 13:14:15 UTC").to_i
|
160
|
+
record = {"a" => 1}
|
161
|
+
|
162
|
+
d.expect_emit tag, time, {"REMOTE_ADDR"=>"129.78.138.66", "a" => 1}
|
163
|
+
|
164
|
+
d.run do
|
165
|
+
res = post("/#{tag}", {"json" => record.to_json, "time" => time.to_s}) { |http, req|
|
166
|
+
# net/http can't send multiple headers so overwrite it.
|
167
|
+
def req.each_capitalized
|
168
|
+
block_given? or return enum_for(__method__) { @header.size }
|
169
|
+
@header.each do |k, vs|
|
170
|
+
vs.each { |v|
|
171
|
+
yield capitalize(k), v
|
172
|
+
}
|
173
|
+
end
|
174
|
+
end
|
175
|
+
req.add_field("X-Forwarded-For", "129.78.138.66, 127.0.0.1")
|
176
|
+
req.add_field("X-Forwarded-For", "8.8.8.8")
|
177
|
+
}
|
178
|
+
assert_equal "200", res.code
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
155
182
|
def test_multi_json_with_add_http_headers
|
156
183
|
d = create_driver(CONFIG + "add_http_headers true")
|
157
184
|
|
@@ -431,9 +458,10 @@ class HttpInputTest < Test::Unit::TestCase
|
|
431
458
|
end
|
432
459
|
end
|
433
460
|
|
434
|
-
def post(path, params, header = {})
|
461
|
+
def post(path, params, header = {}, &block)
|
435
462
|
http = Net::HTTP.new("127.0.0.1", PORT)
|
436
463
|
req = Net::HTTP::Post.new(path, header)
|
464
|
+
block.call(http, req) if block
|
437
465
|
if params.is_a?(String)
|
438
466
|
req.body = params
|
439
467
|
else
|
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: 0.12.
|
4
|
+
version: 0.12.35
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sadayuki Furuhashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -496,7 +496,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
496
496
|
version: '0'
|
497
497
|
requirements: []
|
498
498
|
rubyforge_project:
|
499
|
-
rubygems_version: 2.
|
499
|
+
rubygems_version: 2.6.11
|
500
500
|
signing_key:
|
501
501
|
specification_version: 4
|
502
502
|
summary: Fluentd event collector
|