Add support for snaked-cased hostnames
This commit is contained in:
parent
60c10bb5cc
commit
99ceba43a0
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ readHostPortM :: (MonadFail m) => String -> m Host
|
||||||
-- ^ Read string \"hostname:port\" as @Host hosthame (PortNumber port)@ or \"hostname\" as @host hostname@ (default port). Fail if string does not match either syntax.
|
-- ^ Read string \"hostname:port\" as @Host hosthame (PortNumber port)@ or \"hostname\" as @host hostname@ (default port). Fail if string does not match either syntax.
|
||||||
-- TODO: handle Service port
|
-- TODO: handle Service port
|
||||||
readHostPortM = either (fail . show) return . parse parser "readHostPort" where
|
readHostPortM = either (fail . show) return . parse parser "readHostPort" where
|
||||||
hostname = many1 (letter <|> digit <|> char '-' <|> char '.')
|
hostname = many1 (letter <|> digit <|> char '-' <|> char '.' <|> char '_')
|
||||||
parser = do
|
parser = do
|
||||||
spaces
|
spaces
|
||||||
h <- hostname
|
h <- hostname
|
||||||
|
|
Loading…
Reference in a new issue