Skip to content

Commit

Permalink
Merge pull request #567 from GDATASoftwareAG/ruby/disable-http2
Browse files Browse the repository at this point in the history
Ruby: Overall maintenance, disable HTTP/2
  • Loading branch information
doxthree authored Aug 20, 2024
2 parents ca51997 + 3712184 commit 5a68fc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ruby/lib/vaas/vaas_main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ def upload(message, path)
task.with_timeout(@timeout) do
token = message['upload_token']
url = message['url']

client = Async::HTTP::Internet.new
endpoint = Async::HTTP::Endpoint.parse(url)
client = Async::HTTP::Client.new(endpoint, protocol: Async::HTTP::Protocol::HTTP1)

header = [['authorization', token]]
body = Protocol::HTTP::Body::File.open(File.join(path))
Expand Down
2 changes: 1 addition & 1 deletion ruby/test/vaas_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def create(token = nil, timeout = nil)
assert_equal "Malicious", verdict
# Detection may not be always present
unless detection.empty?
assert_equal "EICAR-Test-File", detection
assert_match /EICAR-Test-File/, detection
end
vaas.close
end
Expand Down
6 changes: 3 additions & 3 deletions ruby/vaas.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Gem::Specification.new do |s|
s.metadata = { "documentation_uri" => "https://github.com/GDATASoftwareAG/vaas/blob/main/ruby/README.md" }
s.required_ruby_version = '>= 3.1.1'

s.add_dependency 'async', '~> 2.3.1'
s.add_dependency 'async-http', '~> 0.59.4'
s.add_dependency 'async-websocket', '~> 0.22.1'
s.add_dependency 'async', '~> 2.15.3'
s.add_dependency 'async-http', '~> 0.70.0'
s.add_dependency 'async-websocket', '~> 0.28.0'

s.add_development_dependency "minitest", '~> 5.17.0'
s.add_development_dependency 'dotenv', '~> 2.8.1'
Expand Down

0 comments on commit 5a68fc9

Please sign in to comment.