From 1823a3dd5443d98eab577988e9627fe74f3491fc Mon Sep 17 00:00:00 2001 From: odr Date: Sat, 11 Jan 2014 13:18:20 +0400 Subject: bugs fixed --- Codec/MIME/Parse.hs | 2 +- Codec/MIME/Type.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Codec/MIME/Parse.hs b/Codec/MIME/Parse.hs index f2d275d..2843903 100644 --- a/Codec/MIME/Parse.hs +++ b/Codec/MIME/Parse.hs @@ -122,7 +122,7 @@ parseHeaders str = findFieldName acc t | T.null t = Right "" | "\r\n" `T.isPrefixOf` t = Right $ T.drop 2 t - | ":" `T.isPrefixOf` t = Left (T.reverse $ T.dropWhile isHSpace acc, t) + | ":" `T.isPrefixOf` t = Left (T.reverse $ T.dropWhile isHSpace acc, T.drop 1 t) | otherwise = findFieldName (T.take 1 t <> acc) $ T.drop 1 t parseFieldValue nm xs diff --git a/Codec/MIME/Type.hs b/Codec/MIME/Type.hs index 68a1b65..2ae9abd 100644 --- a/Codec/MIME/Type.hs +++ b/Codec/MIME/Type.hs @@ -52,7 +52,7 @@ data MIMEType | Multipart Multipart | Text TextType | Video SubType - | Other T.Text SubType + | Other {otherType :: T.Text, otherSubType :: SubType} deriving ( Show, Ord, Eq ) showMIMEType :: MIMEType -> T.Text -- cgit v1.2.3