]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Parser/Http.hs
ETag and Last Modified
[Lucu.git] / Network / HTTP / Lucu / Parser / Http.hs
index c1b30fc208c1d6bbbb787911f642c52de7ef3288..534577c7e6c1c26d388590f5e7966eef4bd00b6a 100644 (file)
@@ -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]