@@ -411,7 +411,7 @@ else (if take 1 s == c then 1 else 0) + countChar c (drop 1 s)
411-- A legitimate `host:port` server name has exactly one `:`, so the multi-colon
411-- A legitimate `host:port` server name has exactly one `:`, so the multi-colon
412-- check leaves that case intact.
412-- check leaves that case intact.
413isBadServerName : Text -> Bool
413isBadServerName : Text -> Bool
414−isBadServerName = \sn -> sn == "" || sn == "localhost" || any (\c -> not contains c "0123456789abcdefghijklmnopqrstuvwxyz-.:") (chars sn) || countChar ":" sn > 1 || any (\p -> hasPrefix p sn) [
414+isBadServerName = \sn -> sn == "" || sn == "localhost" || hasPrefix "localhost:" sn || any (\c -> not contains c "0123456789abcdefghijklmnopqrstuvwxyz-.:") (chars sn) || countChar ":" sn > 1 || any (\p -> hasPrefix p sn) [