summaryrefslogtreecommitdiffstats
path: root/Codec
diff options
context:
space:
mode:
authorodr <olshanskydr@gmail.com>2014-01-11 13:18:20 +0400
committerodr <olshanskydr@gmail.com>2014-01-11 13:18:20 +0400
commit1823a3dd5443d98eab577988e9627fe74f3491fc (patch)
tree7c8c0537f528b8d30eb29c4305b26f5ac713706c /Codec
parent4203423f5a55108d82ecd5f8e6c2b5da8fdc630d (diff)
bugs fixed
Diffstat (limited to 'Codec')
-rw-r--r--Codec/MIME/Parse.hs2
-rw-r--r--Codec/MIME/Type.hs2
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