logstash-input-http 3.10.10-java → 3.10.11-java

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 817809718fd7f4f3fa64b2d6cc8cd8b656fcb7bbd538abddb257b591a3bd84d2
4
- data.tar.gz: 55071bfe43f48f8acfca33f55709f8bf90dbc32cee55e35aac174e94103b5b3a
3
+ metadata.gz: ec9cbf6e38c706ab12e7fe22012a9d1396d0830ecd1284c3164df64c73b851ff
4
+ data.tar.gz: '0084adb55ed70f573f56c2f69aad29cdefd995cf295531a5b362a5747052845a'
5
5
  SHA512:
6
- metadata.gz: eb1a8c58a5bdf52a9250606bf4a179704586a0d8f5c692e250daa637b881fa7cbe90b09247e5a5966c1b87aa8b799147fb3b01a3d4f13eb30f4430a690adbaac
7
- data.tar.gz: 93d4d6defd1396ce336040bbc94abb8b55de0b8e2c68155268be00eee32e6edfff8b10737598ecf88034caba3d05665fff6c3ef2629883aa138fe7ba9b00b64c
6
+ metadata.gz: 826b06a29df17eb8bf8b43e1ae8e235c8f16ed458f411542011e386662a20089f9e76422902109528986d640fc28f73e005f38db8ed48d69c4794959edfabf53
7
+ data.tar.gz: a2757855136c663e1e259415d81b2df70e83eef24085a0772fb0b65cbb1eb0ce4d5bf996e96ae65d49185d2e43ba7cd59b1f80923f60b381b8b423b6bd004bec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.10.11
2
+ - Fix to use the `Content-type` declared charset to decode the request body [#232](https://github.com/logstash-plugins/logstash-input-http/pull/232)
3
+
1
4
  ## 3.10.10
2
5
  - Update Netty dependency to 4.1.136.Final [#229](https://github.com/logstash-plugins/logstash-input-http/pull/229)
3
6
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Logstash Plugin
2
2
 
3
- [![Travis Build Status](https://travis-ci.com/logstash-plugins/logstash-input-http.svg)](https://travis-ci.com/logstash-plugins/logstash-input-http)
3
+ [![Unit Tests](https://github.com/logstash-plugins/logstash-input-http/actions/workflows/unit-tests.yml/badge.svg?branch=3.x)](https://github.com/logstash-plugins/logstash-input-http/actions/workflows/unit-tests.yml)
4
4
 
5
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.10.10
1
+ 3.10.11
data/docs/index.asciidoc CHANGED
@@ -27,6 +27,14 @@ Logstash will convert it into an event for subsequent processing. Users
27
27
  can pass plain text, JSON, or any formatted data and use a corresponding codec with this
28
28
  input. For Content-Type `application/json` the `json` codec is used, but for all other
29
29
  data formats, `plain` codec is used.
30
+ If the `Content-type` header also defines a charset like in:
31
+
32
+ [source,text]
33
+ -----
34
+ curl -X POST -H 'Content-Type: application/json; charset=ISO-8859-1'
35
+ -----
36
+
37
+ then that charset is used to decode the request body. Else UTF-8 is applied.
30
38
 
31
39
  This input can also be used to receive webhook requests to integrate with other services
32
40
  and applications. By taking advantage of the vast plugin ecosystem available in Logstash
@@ -9,4 +9,4 @@ require_jar('io.netty', 'netty-transport', '4.1.136.Final')
9
9
  require_jar('io.netty', 'netty-buffer', '4.1.136.Final')
10
10
  require_jar('io.netty', 'netty-resolver', '4.1.136.Final')
11
11
  require_jar('io.netty', 'netty-common', '4.1.136.Final')
12
- require_jar('org.logstash.plugins.input.http', 'logstash-input-http', '3.10.10')
12
+ require_jar('org.logstash.plugins.input.http', 'logstash-input-http', '3.10.11')
@@ -11,6 +11,17 @@ require 'inputs/helpers'
11
11
 
12
12
  java_import "io.netty.handler.ssl.util.SelfSignedCertificate"
13
13
 
14
+ shared_examples "decodes message with charset" do |charset|
15
+ let(:headers) { { "content-type" => "application/json; charset=#{charset}" } }
16
+ let(:body) { '{"msg":"A Coruña"}'.encode(charset) }
17
+
18
+ it "should decode the message accordingly" do
19
+ client.post("http://127.0.0.1:#{port}/meh.json", :headers => headers, :body => body).call
20
+ event = logstash_queue.pop
21
+ expect(event.get("msg")).to eq("A Coruña")
22
+ end
23
+ end
24
+
14
25
  describe LogStash::Inputs::Http do
15
26
 
16
27
  before do
@@ -209,6 +220,16 @@ describe LogStash::Inputs::Http do
209
220
  expect(event.get("message_body")).to eq("Hello")
210
221
  end
211
222
  end
223
+
224
+ context "when receiving a request with content-type specifying charset" do
225
+ context "ISO-8859-1" do
226
+ it_behaves_like "decodes message with charset", "ISO-8859-1"
227
+ end
228
+
229
+ context "UTF-8" do
230
+ it_behaves_like "decodes message with charset", "utf-8"
231
+ end
232
+ end
212
233
  end
213
234
 
214
235
  context "with json codec" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.10
4
+ version: 3.10.11
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-07-23 00:00:00.000000000 Z
10
+ date: 2026-07-29 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: logstash-core-plugin-api
@@ -176,7 +176,7 @@ files:
176
176
  - vendor/jar-dependencies/io/netty/netty-resolver/4.1.136.Final/netty-resolver-4.1.136.Final.jar
177
177
  - vendor/jar-dependencies/io/netty/netty-transport-native-unix-common/4.1.136.Final/netty-transport-native-unix-common-4.1.136.Final.jar
178
178
  - vendor/jar-dependencies/io/netty/netty-transport/4.1.136.Final/netty-transport-4.1.136.Final.jar
179
- - vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/3.10.10/logstash-input-http-3.10.10.jar
179
+ - vendor/jar-dependencies/org/logstash/plugins/input/http/logstash-input-http/3.10.11/logstash-input-http-3.10.11.jar
180
180
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
181
181
  licenses:
182
182
  - Apache License (2.0)