logstash-input-http 3.0.6 → 3.0.7

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
- SHA1:
3
- metadata.gz: f2d4b38b9ddbd9d99da8909c83c836cab6915fe4
4
- data.tar.gz: dc33fbef0b799e40921dac8185b3ec37a05d325e
2
+ SHA256:
3
+ metadata.gz: e0cfc2c0ffdec2163b2bd28db4cac5e12509396828a8ed59ea768372a13c2726
4
+ data.tar.gz: 82bc2c8ae080551d5f3046870c26f0b28761a4ad9fbd9c716ca2a877a8dcc5f4
5
5
  SHA512:
6
- metadata.gz: 197655f97ba15bdbc0de81db3b437b788f27913d9e5136606c2dbb11e92b54e5441bb011c14df232a81bcb15922aaf10d614a87a78bbd3a0ffb92e2524a8dcbd
7
- data.tar.gz: 18889b42072bec12f31081cdd2cdebc893c68419a90ebb4890d0a2d2bbd461fc968d75869a01710476b2632719eb3cb7319d233cec676bc91edb230190e23ea5
6
+ metadata.gz: '06696c71d5be92acffde997e3f5f3cd591acb06bbe14237c70fa68e30343cd4a84f6323f8c826eb17d63afb08397aee162bfc414bda63f02f80f1ab039dc1e8c'
7
+ data.tar.gz: 7990cf7ed10d3e0b723becc3d01efb3da51f10c2fc895e0b8d8614dc4f87f2d0ce4f45c7fca0c675dd204cad27f42eaaffcd78067eb9adff9e21153f465324f8
@@ -1,3 +1,6 @@
1
+ ## 3.0.7
2
+ - Update gemspec summary
3
+
1
4
  ## 3.0.6
2
5
  - Fix some documentation issues
3
6
 
@@ -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"]
@@ -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
- @codecs.fetch(req["content_type"], @codec).decode(body.read) do |event|
141
- event.set("host", remote_host)
142
- event.set("headers", req)
143
- decorate(event)
144
- queue << event
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
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-http'
3
- s.version = '3.0.6'
3
+ s.version = '3.0.7'
4
4
  s.licenses = ['Apache License (2.0)']
5
- s.summary = "Logstash Input plugin that receives HTTP requests"
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.6
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-08-15 00:00:00.000000000 Z
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 Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program
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.4.8
178
+ rubygems_version: 2.6.11
177
179
  signing_key:
178
180
  specification_version: 4
179
- summary: Logstash Input plugin that receives HTTP requests
181
+ summary: Receives events over HTTP or HTTPS
180
182
  test_files:
181
183
  - spec/inputs/http_spec.rb