Skip to content

Commit

Permalink
Merge pull request #1 from krystal/fix-ssl-eof-error-on-redirects
Browse files Browse the repository at this point in the history
fix: Redirects from the RDAP server were causing an SSL EOF error
  • Loading branch information
adamcooke authored Jun 27, 2024
2 parents dd6c35e + 0943545 commit e66fa2e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ip_contact_finder/rdap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def request(uri, redirect_count: 0)

@logger&.info "Making request to #{uri}"

http.start
response = http.request(request)
@logger&.info "Got response #{response.code}"

Expand All @@ -74,6 +75,8 @@ def request(uri, redirect_count: 0)
rescue SocketError, Errno::ECONNRESET, EOFError, Errno::EINVAL, Errno::ENETUNREACH, Errno::EHOSTUNREACH,
Errno::ECONNREFUSED, OpenSSL::SSL::SSLError, Timeout::Error => e
raise RequestError, "#{e.message} (#{e.class})"
ensure
http.finish
end
end
end

0 comments on commit e66fa2e

Please sign in to comment.