Fix requests to the webserver using IPv6 address http://[1234:1234::] requests.
The host portion contains ":" after split_port_part(), resulting in a 400 error. Renaming is_legal_hostname() to is_legal_host(), since requests to webservers are to "hosts" not "hostnames".