mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-13 00:02:57 -04:00
novoc some more, removed unused code
This commit is contained in:
parent
40e62b590e
commit
e03de0d2c6
@ -4,11 +4,13 @@ require "openssl"
|
||||
|
||||
module HTTPX
|
||||
class SSL < TCP
|
||||
# :nocov:
|
||||
TLS_OPTIONS = if OpenSSL::SSL::SSLContext.instance_methods.include?(:alpn_protocols)
|
||||
{ alpn_protocols: %w[h2 http/1.1] }
|
||||
else
|
||||
{}
|
||||
end
|
||||
# :nocov:
|
||||
|
||||
def initialize(_, _, options)
|
||||
@ctx = OpenSSL::SSL::SSLContext.new
|
||||
@ -18,10 +20,6 @@ module HTTPX
|
||||
@state = :negotiated if @keep_open
|
||||
end
|
||||
|
||||
def scheme
|
||||
"https"
|
||||
end
|
||||
|
||||
def protocol
|
||||
@io.alpn_protocol || super
|
||||
rescue StandardError
|
||||
@ -116,6 +114,7 @@ module HTTPX
|
||||
do_transition(nextstate)
|
||||
end
|
||||
|
||||
# :nocov:
|
||||
def log_transition_state(nextstate)
|
||||
return super unless nextstate == :negotiated
|
||||
|
||||
@ -131,5 +130,6 @@ module HTTPX
|
||||
" issuer: #{server_cert.issuer}\n" \
|
||||
" SSL certificate verify ok."
|
||||
end
|
||||
# :nocov:
|
||||
end
|
||||
end
|
||||
|
@ -41,10 +41,6 @@ module HTTPX
|
||||
@io ||= build_socket
|
||||
end
|
||||
|
||||
def scheme
|
||||
"http"
|
||||
end
|
||||
|
||||
def to_io
|
||||
@io.to_io
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user