X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FParser%2FHttp.hs;h=534577c7e6c1c26d388590f5e7966eef4bd00b6a;hb=1000bdc46cfe7b3ae550ff24ccea9f440f11b42a;hp=c1b30fc208c1d6bbbb787911f642c52de7ef3288;hpb=3c7a58ab749a55a30466a033b170536bcdf18b98;p=Lucu.git diff --git a/Network/HTTP/Lucu/Parser/Http.hs b/Network/HTTP/Lucu/Parser/Http.hs index c1b30fc..534577c 100644 --- a/Network/HTTP/Lucu/Parser/Http.hs +++ b/Network/HTTP/Lucu/Parser/Http.hs @@ -18,7 +18,7 @@ import Network.HTTP.Lucu.Parser isCtl :: Char -> Bool isCtl c | c < '\x1f' = True - | c == '\x7f' = True + | c >= '\x7f' = True | otherwise = False @@ -54,13 +54,11 @@ quotedStr :: Parser String quotedStr = do char '"' xs <- many (qdtext <|> quotedPair) char '"' - return $ foldr (++) "" (["\""] ++ xs ++ ["\""]) + return $ foldr (++) "" xs where - qdtext = char '"' >> fail "" - <|> - do c <- text + qdtext = do c <- satisfy (/= '"') return [c] quotedPair = do q <- char '\\' c <- satisfy isChar - return [q, c] + return [c]