instance method
URI::HTTP#check_host
(::String? v) -> true?
check_host(v)
lib/uri/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/uri/http.rb, line 65
def check_host(v)
ret = super
if ret && v.empty?
raise InvalidComponentError,
"bad component(expected host component): #{v}"
end
ret
end
Do not allow empty host names, as they are not allowed by RFC 3986.