Broaden the check introduced in 229975d61c7e5728ba to account for
"localhost.localdomain" patterns.
Perhaps `isPrefixOf "localhost"` would be desireable, instead?
commitfa5252264da6b979b711bf52d263ab4ec3cee9c5
authorLeif Warner <leif@janrain.com>
dateTue 29 Oct 2013, 19:47 (13 years ago)
parent53ce3cc
src/Idris/REPL.hs+3−1
@@ -121,7 +121,9 @@ startServer orig stvar fn_in = do tid <- runIO $ forkOS serverLoop
121121
122122 loop fn ist sock
123123 = do (h,host,_) <- accept sock
124− if (host == "localhost" ||
124+ -- just use the local part of the hostname
125+ -- for the "localhost.localdomain" case
126+ if ((takeWhile (/= '.') host) == "localhost" ||
125127 host == "127.0.0.1")
126128 then do
127129 cmd <- hGetLine h