X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FRequest.hs;fp=Network%2FHTTP%2FLucu%2FRequest.hs;h=3fc0164ca167de1116504478e0363e6e421de1cb;hp=b316730d1112174b26e8aec564b20dd4c38c2ea0;hb=47206637d664f163316dc9bb20983440ae4b138f;hpb=d05d8c883eaca12ee621975a2b95c5ebdc2357d2 diff --git a/Network/HTTP/Lucu/Request.hs b/Network/HTTP/Lucu/Request.hs index b316730..3fc0164 100644 --- a/Network/HTTP/Lucu/Request.hs +++ b/Network/HTTP/Lucu/Request.hs @@ -76,7 +76,7 @@ methodP = (let methods = [ ("OPTIONS", OPTIONS) , ("TRACE" , TRACE ) , ("CONNECT", CONNECT) ] - in foldl (<|>) (fail "") $ map (\ (str, mth) + in foldl (<|>) failP $ map (\ (str, mth) -> string str >> return mth) methods) <|> token >>= return . ExtensionMethod @@ -85,5 +85,5 @@ methodP = (let methods = [ ("OPTIONS", OPTIONS) uriP :: Parser URI uriP = do str <- many1 $ satisfy (\ c -> not (isCtl c || c == ' ')) case parseURIReference str of - Nothing -> fail "" + Nothing -> failP Just uri -> return uri \ No newline at end of file