logstash-input-http 3.0.6 → 3.0.7
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 +5 -5
- data/CHANGELOG.md +3 -0
- data/docs/index.asciidoc +0 -3
- data/lib/logstash/inputs/http.rb +12 -6
- data/logstash-input-http.gemspec +2 -2
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e0cfc2c0ffdec2163b2bd28db4cac5e12509396828a8ed59ea768372a13c2726
|
4
|
+
data.tar.gz: 82bc2c8ae080551d5f3046870c26f0b28761a4ad9fbd9c716ca2a877a8dcc5f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '06696c71d5be92acffde997e3f5f3cd591acb06bbe14237c70fa68e30343cd4a84f6323f8c826eb17d63afb08397aee162bfc414bda63f02f80f1ab039dc1e8c'
|
7
|
+
data.tar.gz: 7990cf7ed10d3e0b723becc3d01efb3da51f10c2fc895e0b8d8614dc4f87f2d0ce4f45c7fca0c675dd204cad27f42eaaffcd78067eb9adff9e21153f465324f8
|
data/CHANGELOG.md
CHANGED
data/docs/index.asciidoc
CHANGED
@@ -83,9 +83,6 @@ and no codec for the request's content-type is found
|
|
83
83
|
* Value type is <<string,string>>
|
84
84
|
* Default value is `"0.0.0.0"`
|
85
85
|
|
86
|
-
Codec used to decode the incoming data.
|
87
|
-
This codec will be used as a fall-back if the content-type
|
88
|
-
is not found in the "additional_codecs" hash
|
89
86
|
The host or ip to bind
|
90
87
|
|
91
88
|
[id="plugins-{type}s-{plugin}-keystore"]
|
data/lib/logstash/inputs/http.rb
CHANGED
@@ -7,7 +7,7 @@ require "puma/server"
|
|
7
7
|
require "puma/minissl"
|
8
8
|
require "base64"
|
9
9
|
require "rack"
|
10
|
-
|
10
|
+
require "java"
|
11
11
|
|
12
12
|
##
|
13
13
|
# We keep the redefined method in a new http server class, this is because
|
@@ -125,6 +125,7 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
|
|
125
125
|
@additional_codecs.each do |content_type, codec|
|
126
126
|
@codecs[content_type] = LogStash::Plugin.lookup("codec", codec).new
|
127
127
|
end
|
128
|
+
@codec_lock = java.util.concurrent.locks.ReentrantLock.new
|
128
129
|
end # def register
|
129
130
|
|
130
131
|
def run(queue)
|
@@ -137,11 +138,16 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
|
|
137
138
|
REJECTED_HEADERS.each {|k| req.delete(k) }
|
138
139
|
req = lowercase_keys(req)
|
139
140
|
body = req.delete("rack.input")
|
140
|
-
@
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
141
|
+
@codec_lock.lock
|
142
|
+
begin
|
143
|
+
@codecs.fetch(req["content_type"], @codec).decode(body.read) do |event|
|
144
|
+
event.set("host", remote_host)
|
145
|
+
event.set("headers", req)
|
146
|
+
decorate(event)
|
147
|
+
queue << event
|
148
|
+
end
|
149
|
+
ensure
|
150
|
+
@codec_lock.unlock
|
145
151
|
end
|
146
152
|
['200', @response_headers, ['ok']]
|
147
153
|
rescue => e
|
data/logstash-input-http.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-input-http'
|
3
|
-
s.version = '3.0.
|
3
|
+
s.version = '3.0.7'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
|
-
s.summary = "
|
5
|
+
s.summary = "Receives events over HTTP or HTTPS"
|
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 gemname. This gem is not a stand-alone program"
|
7
7
|
s.authors = ["Elastic"]
|
8
8
|
s.email = 'info@elastic.co'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-input-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,7 +134,9 @@ dependencies:
|
|
134
134
|
- - ">="
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
|
-
description: This gem is a Logstash plugin required to be installed on top of the
|
137
|
+
description: This gem is a Logstash plugin required to be installed on top of the
|
138
|
+
Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
|
139
|
+
gem is not a stand-alone program
|
138
140
|
email: info@elastic.co
|
139
141
|
executables: []
|
140
142
|
extensions: []
|
@@ -173,9 +175,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
175
|
version: '0'
|
174
176
|
requirements: []
|
175
177
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.
|
178
|
+
rubygems_version: 2.6.11
|
177
179
|
signing_key:
|
178
180
|
specification_version: 4
|
179
|
-
summary:
|
181
|
+
summary: Receives events over HTTP or HTTPS
|
180
182
|
test_files:
|
181
183
|
- spec/inputs/http_spec.rb
|