MCPcopy Create free account
hub / github.com/apache/trafficserver / validate_host_name

Function validate_host_name

src/proxy/hdrs/URL.cc:120–124  ·  view source on GitHub ↗

Checks if `addr` is a valid FQDN string

Source from the content-addressed store, hash-verified

118
119// Checks if `addr` is a valid FQDN string
120bool
121validate_host_name(std::string_view addr)
122{
123 return std::all_of(addr.begin(), addr.end(), &is_host_char);
124}
125
126/**
127 Checks if the (un-well-known) scheme is valid

Callers 3

url_parse_internetFunction · 0.85
validate_hdr_hostFunction · 0.85
test_URL.ccFile · 0.85

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected