logstash-filter-http 1.4.3 → 1.5.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
  SHA256:
3
- metadata.gz: 115c2c25afb8de24c53df0f55cd72b9a4e02d1fd6536a2eb8e5450c0ba4830df
4
- data.tar.gz: 6c2dcab69cdae94dc7c98aeca7ff023451ba681d674b813e575b6f5c68ee8edd
3
+ metadata.gz: 81c8d1ec8c914081f8ce16a71a22be25e114afa967fb327c133503a5cca7263f
4
+ data.tar.gz: 37f64bd9d01e2361881fccf2d638b6471372fe1b69acd81e36efdfccb2e61916
5
5
  SHA512:
6
- metadata.gz: b4b38e4785d4a4674511d62b62f02caf7f161cb0523d2991aa375066c9c16b0c1323726a691b543dd614d9bcf6eccf291072548bd61617d63b031a59752a138a
7
- data.tar.gz: 62b3b7e17e567cb4aefd648bb25629f2c1c1b5c87ba008d4259fdf70078f8e5c2ede799f0c6339f7acb89a9692fff7e7c3c869d87514947ab0ce8ec00c818a1b
6
+ metadata.gz: 42b529894dd5d0b34b398ed1522b6b1472ca0d934d8d52e932017b7f9dc9d6412d1ff17265bad21ba8bdd6ed0ea29d6a04627a476ebcdd375be1a2676a959d2f
7
+ data.tar.gz: b0111d7b61fe6f092526e919302e01ec73ab1e6c1c75d2329e8337ad67a14036195509e1357320f8228340cff0e85bba0b92da440f1ace5e6e52e49eba5baf3c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 1.5.1
2
+ - Don't process response when the body is empty. [#50](https://github.com/logstash-plugins/logstash-filter-http/pull/50)
3
+
4
+ ## 1.5.0
5
+ - Added standardized SSL settings and deprecates their non-standard counterparts. Deprecated settings will continue to work, and will provide pipeline maintainers with guidance toward using their standardized counterparts [#49](https://github.com/logstash-plugins/logstash-filter-http/pull/49)
6
+ - Added new `ssl_truststore_path`, `ssl_truststore_password`, and `ssl_truststore_type` settings for configuring SSL-trust using a PKCS-12 or JKS trust store, deprecating their `truststore`, `truststore_password`, and `truststore_type` counterparts.
7
+ - Added new `ssl_certificate_authorities` setting for configuring SSL-trust using a PEM-formatted list certificate authorities, deprecating its `cacert` counterpart.
8
+ - Added new `ssl_keystore_path`, `ssl_keystore_password`, and `ssl_keystore_type` settings for configuring SSL-identity using a PKCS-12 or JKS key store, deprecating their `keystore`, `keystore_password`, and `keystore_type` counterparts.
9
+ - Added new `ssl_certificate` and `ssl_key` settings for configuring SSL-identity using a PEM-formatted certificate/key pair, deprecating their `client_cert` and `client_key` counterparts.
10
+ - Added the `ssl_cipher_suites` option
11
+
1
12
  ## 1.4.3
2
13
  - DOC: add clarification on sending data as json [#48](https://github.com/logstash-plugins/logstash-filter-http/pull/48)
3
14
 
@@ -16,7 +16,7 @@ class LogStash::Filters::Http < LogStash::Filters::Base
16
16
 
17
17
  extend LogStash::PluginMixins::ValidatorSupport::FieldReferenceValidationAdapter
18
18
 
19
- include LogStash::PluginMixins::HttpClient
19
+ include LogStash::PluginMixins::HttpClient[:with_deprecated => true]
20
20
 
21
21
  config_name 'http'
22
22
 
@@ -136,6 +136,8 @@ EOF
136
136
  event.set(@target_headers, headers)
137
137
  return if @verb == 'head' # Since HEAD requests will not contain body, we need to set only header
138
138
 
139
+ return if body.nil? #Return on empty bodys (e.g. 204 response)
140
+
139
141
  if headers_has_json_content_type?(headers)
140
142
  begin
141
143
  parsed = LogStash::Json.load(body)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-http'
3
- s.version = '1.4.3'
3
+ s.version = '1.5.1'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = 'This filter requests data from a RESTful Web Service.'
6
6
  s.description = 'This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install logstash-filter-http. This gem is not a stand-alone program'
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
28
28
  # Gem dependencies
29
29
  s.add_runtime_dependency 'logstash-core-plugin-api', '>= 1.60', '<= 2.99'
30
30
  s.add_runtime_dependency 'logstash-mixin-ecs_compatibility_support', '~>1.2'
31
- s.add_runtime_dependency "logstash-mixin-http_client", ">= 7.2.0", '< 9.0.0'
31
+ s.add_runtime_dependency "logstash-mixin-http_client", ">= 7.3.0", "< 8.0.0"
32
32
  s.add_runtime_dependency 'logstash-mixin-validator_support', '~> 1.0'
33
33
 
34
34
  s.add_development_dependency 'logstash-devutils'
@@ -61,6 +61,14 @@ describe LogStash::Filters::Http do
61
61
  end
62
62
  end
63
63
 
64
+ context "when there is no body" do
65
+ let(:response) { [204, {}, nil] }
66
+
67
+ it "doesn't write a body to the event" do
68
+ expect(event.get('[gw-response]')).to be_nil
69
+ end
70
+ end
71
+
64
72
  context 'with body target' do
65
73
 
66
74
  let(:config) { super().merge "target_body" => '[rest]' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-21 00:00:00.000000000 Z
11
+ date: 2024-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -49,10 +49,10 @@ dependencies:
49
49
  requirements:
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 7.2.0
52
+ version: 7.3.0
53
53
  - - "<"
54
54
  - !ruby/object:Gem::Version
55
- version: 9.0.0
55
+ version: 8.0.0
56
56
  name: logstash-mixin-http_client
57
57
  prerelease: false
58
58
  type: :runtime
@@ -60,10 +60,10 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: 7.2.0
63
+ version: 7.3.0
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
- version: 9.0.0
66
+ version: 8.0.0
67
67
  - !ruby/object:Gem::Dependency
68
68
  requirement: !ruby/object:Gem::Requirement
69
69
  requirements:
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
- rubygems_version: 3.1.6
132
+ rubygems_version: 3.2.33
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: This filter requests data from a RESTful Web Service.