logstash-input-http 3.2.4-java → 3.3.0-java

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: b7157983f7efce63ef69943170bfd1b9fc83d10469f7cae6d40cf4c3315685d3
4
- data.tar.gz: ff57e6caae6da3404c2557b4395f556a8348e71442aee2ecaa17802cbcf30d08
3
+ metadata.gz: 92e713ed58dc95fd484874bef08c957a1a22ec47a3f0dfeaf9dc7f14769e9049
4
+ data.tar.gz: 36d6efc77e63323d295ac5a5dffd7357195cde8415851faed480b48534e49220
5
5
  SHA512:
6
- metadata.gz: 05c50ff227809cbf7232f4b5fae41cf87bff8ab8a010e110afed32be4e97dccad848b875668a2ff12f65126d92874095695354252106b0f1a90bda4ecb538a87
7
- data.tar.gz: 377497ac63e31baa3fd9349be861d387ba2024d054fbfcd4cb1b59a3ed1cffee94a123b61f65288d98be8a2ef1cca9a4ac62da720f9851e1e756f00433fe8d89
6
+ metadata.gz: c749f65f31e6ed9ca8c6502a66cdaec6b2dd9b739969104938043bbf764f017f107fef908b27de7e28683c217092ddda7219c4594480d7298fcfd0b5bcc78738
7
+ data.tar.gz: 53adf0bc2ff98f28fccf0133db8221a3b02f8474a549d9b332e67f751773b080f350c8a479f3ac5a14308b45f390afaceb247583116de3a51a80c61609ffc215
@@ -1,3 +1,7 @@
1
+ ## 3.3.0
2
+ - Added configurable response code option [#103](https://github.com/logstash-plugins/logstash-input-http/pull/103)
3
+ - Added explanation about operation order of codec and additional_codecs [#104](https://github.com/logstash-plugins/logstash-input-http/pull/104)
4
+
1
5
  ## 3.2.4
2
6
  - Loosen jar-dependencies manager gem dependency to allow plugin to work with JRubies that include a later version.
3
7
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.4
1
+ 3.3.0
@@ -52,6 +52,13 @@ You can pass in a username, password combination while sending data to this inpu
52
52
  You can also setup SSL and send data securely over https, with multiple options such as
53
53
  validating the client's certificate.
54
54
 
55
+ [id="plugins-{type}s-{plugin}-codec-settings"]
56
+ ==== Codec settings
57
+ This plugin has two configuration options for codecs: `codec` and `additional_codecs`.
58
+
59
+ Values in `additional_codecs` are prioritized over those specified in the
60
+ `codec` option. That is, the default `codec` is applied only if no codec
61
+ for the request's content-type is found in the `additional_codecs` setting.
55
62
 
56
63
  [id="plugins-{type}s-{plugin}-options"]
57
64
  ==== Http Input Configuration Options
@@ -4,4 +4,4 @@ require 'jar_dependencies'
4
4
  require_jar('io.netty', 'netty-all', '4.1.30.Final')
5
5
  require_jar('io.netty', 'netty-tcnative-boringssl-static', '2.0.12.Final')
6
6
  require_jar('org.apache.logging.log4j', 'log4j-api', '2.11.1')
7
- require_jar('org.logstash.plugins.input.http', 'logstash-input-http', '3.2.4')
7
+ require_jar('org.logstash.plugins.input.http', 'logstash-input-http', '3.3.0')
@@ -115,6 +115,7 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
115
115
 
116
116
  config :max_content_length, :validate => :number, :required => false, :default => 100 * 1024 * 1024
117
117
 
118
+ config :response_code, :validate => [200, 202, 204], :default => 200
118
119
  # Deprecated options
119
120
 
120
121
  # The JKS keystore to validate the client's certificates
@@ -210,7 +211,7 @@ class LogStash::Inputs::Http < LogStash::Inputs::Base
210
211
 
211
212
  def create_http_server(message_handler)
212
213
  org.logstash.plugins.inputs.http.NettyHttpServer.new(
213
- @host, @port, message_handler, build_ssl_params(), @threads, @max_pending_requests, @max_content_length)
214
+ @host, @port, message_handler, build_ssl_params(), @threads, @max_pending_requests, @max_content_length, @response_code)
214
215
  end
215
216
 
216
217
  def build_ssl_params
@@ -341,6 +341,22 @@ describe LogStash::Inputs::Http do
341
341
  end
342
342
  end
343
343
  end
344
+ describe "return code" do
345
+ it "responds with a 200" do
346
+ response = client.post("http://127.0.0.1:#{port}", :body => "hello")
347
+ response.call
348
+ expect(response.code).to eq(200)
349
+ end
350
+ context "when response_code is configured" do
351
+ let(:code) { 202 }
352
+ subject { LogStash::Inputs::Http.new("port" => port, "response_code" => code) }
353
+ it "responds with the configured code" do
354
+ response = client.post("http://127.0.0.1:#{port}", :body => "hello")
355
+ response.call
356
+ expect(response.code).to eq(202)
357
+ end
358
+ end
359
+ end
344
360
  end
345
361
 
346
362
  context "with :ssl => false" do
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.2.4
4
+ version: 3.3.0
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-30 00:00:00.000000000 Z
11
+ date: 2019-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +147,7 @@ files:
147
147
  - vendor/jar-dependencies/io/netty/netty-all/4.1.30.Final/netty-all-4.1.30.Final.jar
148
148
  - vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/2.0.12.Final/netty-tcnative-boringssl-static-2.0.12.Final.jar
149
149
  - vendor/jar-dependencies/org/apache/logging/log4j/log4j-api/2.11.1/log4j-api-2.11.1.jar
150
- - vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/3.2.4/logstash-input-http-3.2.4.jar
150
+ - vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/3.3.0/logstash-input-http-3.3.0.jar
151
151
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
152
152
  licenses:
153
153
  - Apache License (2.0)