logstash-filter-http 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/filters/http.rb +1 -0
- data/logstash-filter-http.gemspec +1 -1
- data/spec/filters/http_spec.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf9e6e5719322e393443523446a54d9940048cd2dc540d4f71afedf7dd58b1dd
|
4
|
+
data.tar.gz: 72869368a417ccc28e522ab0ef47a3910d3bdb8565a9c215108a3cc3d8f088ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c76225e97cc973becbace99e5f2af1cbbebcdc73d264e735dc6064b5d7d1ecd88a51f0665bed3df2c6571d209c61ffa044be69f009762454713d367f96e653b
|
7
|
+
data.tar.gz: 2cffbf09fc61fd9a0fc7594e7f828497e9c8e098e056053c8791a2d9bb16533cedf2b31f3cf934f1bd5cc40e9d2574f007895a90ff469d962fb4a6d6f19eec52
|
data/CHANGELOG.md
CHANGED
@@ -134,6 +134,7 @@ EOF
|
|
134
134
|
def process_response(body, headers, event)
|
135
135
|
content_type, _ = headers.fetch("content-type", "").split(";")
|
136
136
|
event.set(@target_headers, headers)
|
137
|
+
return if @verb == 'head' # Since HEAD requests will not contain body, we need to set only header
|
137
138
|
if content_type == "application/json"
|
138
139
|
begin
|
139
140
|
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
|
+
s.version = '1.4.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'
|
data/spec/filters/http_spec.rb
CHANGED
@@ -191,7 +191,6 @@ describe LogStash::Filters::Http do
|
|
191
191
|
before(:each) { subject.register }
|
192
192
|
let(:response) { [200, {}, "Bom dia"] }
|
193
193
|
let(:url) { "http://stringsize.com" }
|
194
|
-
let(:config) { super().merge "body" => body }
|
195
194
|
|
196
195
|
describe "format" do
|
197
196
|
let(:config) { super().merge "body_format" => body_format, "body" => body }
|
@@ -277,6 +276,16 @@ describe LogStash::Filters::Http do
|
|
277
276
|
subject.filter(event)
|
278
277
|
end
|
279
278
|
end
|
279
|
+
context "when the verb is HEAD" do
|
280
|
+
let(:config) { super().merge("verb" => "HEAD") }
|
281
|
+
before(:each) do
|
282
|
+
allow(subject).to receive(:request_http).and_return(response)
|
283
|
+
end
|
284
|
+
it "does not include the body" do
|
285
|
+
subject.filter(event)
|
286
|
+
expect(event).to_not include("body")
|
287
|
+
end
|
288
|
+
end
|
280
289
|
end
|
281
290
|
describe "verb" do
|
282
291
|
let(:response) { [200, {}, "Bom dia"] }
|
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.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|