std.Io.net: make HostName.validate RFC 1123-compliant

The implementation of HostName.validate was too generous. It considered
strings like ".example.com", "exa..mple.com", and "-example.com" to be
valid hostnames, which is incorrect according to RFC 1123 (the currently
accepted standard).

Reviewed-on: https://github.com/ziglang/zig/pull/25710
efe649b13eJon Parise committed on 1/9/2026, 4:40:32 AM· committed by Andrew Kelleyparent6069161
1 file changedLine totals unavailable