Add more doctests

This commit is contained in:
2021-08-24 10:51:39 +02:00
parent f624a83e87
commit 8247c0b00b

View File

@@ -601,5 +601,7 @@ urlBaseName = snd . B.breakEnd (== _slash) . urlDecode False
--
-- >>> getLastHeader "\n\nHTTP/1.0 200 Connection established\n\nHTTP/1.1 304 Not Modified\n"
-- "HTTP/1.1 304 Not Modified\n"
-- >>> getLastHeader "HTTP/1.1 304 Not Modified\n"
-- "HTTP/1.1 304 Not Modified\n"
getLastHeader :: T.Text -> T.Text
getLastHeader = T.unlines . lastDef [] . filter (\x -> not (null x)) . splitOn [""] . fmap T.stripEnd . T.lines