mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-05 00:02:38 -04:00
while this type of error is avoided when doing HEv2, the IPs remain in the cache; this means that, one the same host is reached, the IPs are loaded onto the same socket, and if the issue is IPv6 connectivity, it'll break outside of the HEv2 flow. this error is now protected inside the connect block, so that other IPs in the list can be tried after; the IP is then evicted from the cachee. HEv2 related regression test is disabled in CI, as it's currently reliable in Gitlab CI, which allows to resolve the IPv6 address, but does not allow connecting to it
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
module HTTPX
|
|
type ipaddr = IPAddr | String
|
|
|
|
module Resolver
|
|
type dns_resource = singleton(Resolv::DNS::Resource)
|
|
|
|
type dns_result = { "name" => String, "TTL" => Numeric, "alias" => String }
|
|
| { "name" => String, "TTL" => Numeric, "data" => String }
|
|
|
|
RESOLVE_TIMEOUT: Array[Integer]
|
|
|
|
self.@lookup_mutex: Thread::Mutex
|
|
self.@lookups: Hash[String, Array[dns_result]]
|
|
self.@identifier_mutex: Thread::Mutex
|
|
self.@identifier: Integer
|
|
self.@system_resolver: Resolv::Hosts
|
|
|
|
type dns_decoding_response = [:ok, Array[dns_result]] | [:decode_error, Resolv::DNS::DecodeError] | [:dns_error, Integer] | Symbol
|
|
|
|
def self?.nolookup_resolve: (String hostname) -> Array[IPAddr]?
|
|
|
|
def self?.ip_resolve: (String hostname) -> Array[IPAddr]?
|
|
|
|
def self?.system_resolve: (String hostname) -> Array[IPAddr]?
|
|
|
|
def self?.resolver_for: (:native resolver_type) -> singleton(Native) |
|
|
(:system resolver_type) -> singleton(System) |
|
|
(:https resolver_type) -> singleton(HTTPS) |
|
|
[U] (U resolver_type) -> U
|
|
|
|
def self?.cached_lookup: (String hostname) -> Array[IPAddr]?
|
|
|
|
def self?.cached_lookup_set: (String hostname, ip_family family, Array[dns_result] addresses) -> void
|
|
|
|
def self?.cached_lookup_evict: (String hostname, ipaddr ip) -> void
|
|
|
|
def self?.lookup: (String hostname, Hash[String, Array[dns_result]] lookups, Numeric ttl) -> Array[IPAddr]?
|
|
|
|
def self?.generate_id: () -> Integer
|
|
|
|
def self?.encode_dns_query: (String hostname, ?type: dns_resource, ?message_id: Integer) -> String
|
|
|
|
def self?.decode_dns_answer: (String) -> dns_decoding_response
|
|
|
|
def self?.lookup_synchronize: [U] () { (Hash[String, Array[dns_result]] lookups) -> U } -> U
|
|
|
|
def self?.id_synchronize: () { () -> void } -> void
|
|
end
|
|
end |