summaryrefslogtreecommitdiffstats
path: root/Codec/MIME
diff options
context:
space:
mode:
Diffstat (limited to 'Codec/MIME')
-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