Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 5.7.1
- Added new development `rackup` dependency to fix tests

## 5.7.0
- Added new `ssl_enabled` setting for enabling/disabling the SSL configurations [#144](https://github.com/logstash-plugins/logstash-output-http/pull/144)

Expand Down
5 changes: 4 additions & 1 deletion logstash-output-http.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-output-http'
s.version = '5.7.0'
s.version = '5.7.1'
s.licenses = ['Apache License (2.0)']
s.summary = "Sends events to a generic HTTP or HTTPS endpoint"
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"
Expand All @@ -25,4 +25,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'logstash-devutils'
s.add_development_dependency 'sinatra'
s.add_development_dependency 'webrick'

# Pin to avoid using new Fiber-based implementation that breaks tests here
s.add_development_dependency 'rackup', "< 2.1.0"
end
11 changes: 9 additions & 2 deletions spec/outputs/http_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
end

let(:last_request) { TestApp.last_request }
let(:body) { last_request.body.read }
let(:body) { read_last_request_body(last_request) }
let(:content_type) { last_request.env["CONTENT_TYPE"] }

it "should receive the request" do
Expand Down Expand Up @@ -458,7 +458,7 @@
after { subject.close }

let(:last_request) { TestApp.last_request }
let(:last_request_body) { last_request.body.read }
let(:last_request_body) { read_last_request_body(last_request) }

let(:event) { LogStash::Event.new("message" => "hello!") }

Expand Down Expand Up @@ -530,3 +530,10 @@
end if tls_version_enabled_by_default?('TLSv1.3') && JOpenSSL::VERSION > '0.12' # due WEBrick uses OpenSSL

end

# Pre-emptively rewind the retrieval of `last_request.body` - for form based endpoints, the body
# is placed in params, and body is empty, requiring a `rewind` for the body to be available for comparison
def read_last_request_body(last_request)
last_request.body.rewind
last_request.body.read
end