fluent-plugin-http-pull 0.6.0 → 0.6.1

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
  SHA1:
3
- metadata.gz: 4431d08247cac9ded691561df1f37e0ca301812c
4
- data.tar.gz: 34533a363fe85ac8a9e8fe6f7732d25cebe0ea43
3
+ metadata.gz: f1480636da1bab4f88742d01d09a28689dc23f4f
4
+ data.tar.gz: 6684def2381874b18aebf9e0b882d8d478f7413b
5
5
  SHA512:
6
- metadata.gz: 3ab0a2aad719fb68cda02595b9b7df31c5d8f611534898aee88323c325358ba0915c7937deff0b317ca51ebea4d3fa535ebc929f08d8783cb4932022d514c55c
7
- data.tar.gz: c8ed089e7978a0ae4dc7dea11ac71e5b5b819def2d2136cc9e43f1111c4ddf8cf5d694ebc0b2d9f22707bcecbf2b53677670794153f509bd59c8e19ee84b1d51
6
+ metadata.gz: 741429737da8ed091713200ee6f59bfd8716070680715cade5c36959a1b7962fc7310bfdc2413873115baa7820b993b58165bbbae86e948707a5b79b90c52921
7
+ data.tar.gz: c765d56d66a4b2bad85d30919f497eccf3a180038ca1122a59e0d96ecfa9f0a8016607c039d79b14175a3e3dfae3c44b92203b861bc16a280dc0481735079e56
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-http-pull"
6
- spec.version = "0.6.0"
6
+ spec.version = "0.6.1"
7
7
  spec.authors = ["filepang"]
8
8
  spec.email = ["filepang@gmail.com"]
9
9
 
@@ -71,12 +71,14 @@ module Fluent
71
71
  super
72
72
 
73
73
  @parser = parser_create unless @status_only
74
- @_request_headers = @request_headers.map do |section|
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-http-pull
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - filepang