fluent-plugin-http-pull 0.6.0 → 0.6.1
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.
- checksums.yaml +4 -4
- data/fluent-plugin-http-pull.gemspec +1 -1
- data/lib/fluent/plugin/in_http_pull.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1480636da1bab4f88742d01d09a28689dc23f4f
|
|
4
|
+
data.tar.gz: 6684def2381874b18aebf9e0b882d8d478f7413b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 741429737da8ed091713200ee6f59bfd8716070680715cade5c36959a1b7962fc7310bfdc2413873115baa7820b993b58165bbbae86e948707a5b79b90c52921
|
|
7
|
+
data.tar.gz: c765d56d66a4b2bad85d30919f497eccf3a180038ca1122a59e0d96ecfa9f0a8016607c039d79b14175a3e3dfae3c44b92203b861bc16a280dc0481735079e56
|
|
@@ -71,12 +71,14 @@ module Fluent
|
|
|
71
71
|
super
|
|
72
72
|
|
|
73
73
|
@parser = parser_create unless @status_only
|
|
74
|
-
@_request_headers =
|
|
74
|
+
@_request_headers = {
|
|
75
|
+
"Content-Type" => "application/x-www-form-urlencoded"
|
|
76
|
+
}.merge(@request_headers.map do |section|
|
|
75
77
|
header = section["header"]
|
|
76
78
|
value = section["value"]
|
|
77
79
|
|
|
78
80
|
[header.to_sym, value]
|
|
79
|
-
end.to_h
|
|
81
|
+
end.to_h)
|
|
80
82
|
|
|
81
83
|
@http_method = :head if @status_only
|
|
82
84
|
end
|
|
@@ -91,12 +93,11 @@ module Fluent
|
|
|
91
93
|
record = { "url" => @url }
|
|
92
94
|
|
|
93
95
|
begin
|
|
94
|
-
request_options = { method: @http_method, url: @url, timeout: @timeout }
|
|
96
|
+
request_options = { method: @http_method, url: @url, timeout: @timeout, headers: @_request_headers }
|
|
95
97
|
|
|
96
98
|
request_options[:proxy] = @proxy if @proxy
|
|
97
99
|
request_options[:user] = @user if @user
|
|
98
100
|
request_options[:password] = @password if @password
|
|
99
|
-
request_options[:headers] = @_request_headers unless @request_headers.empty?
|
|
100
101
|
|
|
101
102
|
res = RestClient::Request.execute request_options
|
|
102
103
|
|