Host parsing synced with WHATWG spec wrt W3 bug #24257.

See https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257