mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-11-27 00:03:01 -05:00
set ndots to 1 when none parsed from resolv.conf
as per https://www.man7.org/linux/man-pages/man5/resolv.conf.5.html, default is 1
This commit is contained in:
parent
61ce888e47
commit
0cb169afab
@ -30,7 +30,7 @@ module HTTPX
|
||||
nameserver = nameserver[family] if nameserver.is_a?(Hash)
|
||||
Array(nameserver)
|
||||
end
|
||||
@ndots = @resolver_options[:ndots]
|
||||
@ndots = @resolver_options.fetch(:ndots, 1)
|
||||
@search = Array(@resolver_options[:search]).map { |srch| srch.scan(/[^.]+/) }
|
||||
@_timeouts = Array(@resolver_options[:timeouts])
|
||||
@timeouts = Hash.new { |timeouts, host| timeouts[host] = @_timeouts.dup }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user