logstash-filter-http 1.5.0 → 1.6.0
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/CHANGELOG.md +6 -0
- data/lib/logstash/filters/http.rb +2 -0
- data/logstash-filter-http.gemspec +2 -2
- data/spec/filters/http_spec.rb +8 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a4938972c776b2007e275e78c0dae1494ce21bc60ca4106972a7dc8501aa813
|
4
|
+
data.tar.gz: c491efcaad17a7a926e1befd2bbc0ea01951a9d8fea989580a3ae0f1ab68a517
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cef735dd36b419dbbaa8aba20f0843db1c0bc97e4ca9c226410fd75e5bb033a4e100e3ab8bdff499c63832aedba959a0117d05db938f1c7935abb38d20f08fb3
|
7
|
+
data.tar.gz: 0a376d1ce19dc7107abf07a89531dd2614b3ff25f4a573f20c5e01bdde95f926933e844c0190effa61c47f933b3ad086a6035f471efd82dffbc6c9359f8a46fe
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 1.6.0
|
2
|
+
- Added new `ssl_enabled` setting for enabling/disabling the SSL configurations [#52](https://github.com/logstash-plugins/logstash-filter-http/pull/52)
|
3
|
+
|
4
|
+
## 1.5.1
|
5
|
+
- Don't process response when the body is empty. [#50](https://github.com/logstash-plugins/logstash-filter-http/pull/50)
|
6
|
+
|
1
7
|
## 1.5.0
|
2
8
|
- 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)
|
3
9
|
- 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.
|
@@ -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.
|
3
|
+
s.version = '1.6.0'
|
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.
|
31
|
+
s.add_runtime_dependency "logstash-mixin-http_client", ">= 7.4.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'
|
data/spec/filters/http_spec.rb
CHANGED
@@ -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
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
requirements:
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 7.
|
52
|
+
version: 7.4.0
|
53
53
|
- - "<"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: 8.0.0
|
@@ -60,7 +60,7 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 7.
|
63
|
+
version: 7.4.0
|
64
64
|
- - "<"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: 8.0.0
|