summaryrefslogtreecommitdiffstats
path: root/Codec/MIME
diff options
context:
space:
mode:
authorSigbjorn Finne <sigbjorn.finne@gmail.com>2009-12-21 07:47:29 +0100
committerSigbjorn Finne <sigbjorn.finne@gmail.com>2009-12-21 07:47:29 +0100
commit0a322480cdb379a44d1b5aabe0411966d86e78ea (patch)
tree52d86a19e74109c1d5cfc8a488531a929f23a23a /Codec/MIME
parent7c0a90bd7d012296eefbe2bfb07327752654b37c (diff)
0.3.2: extend export list for C.M.Parse; updated maintainer info
Diffstat (limited to 'Codec/MIME')
-rw-r--r--Codec/MIME/Base64.hs2
-rw-r--r--Codec/MIME/Decode.hs2
-rw-r--r--Codec/MIME/Parse.hs21
-rw-r--r--Codec/MIME/QuotedPrintable.hs4
-rw-r--r--Codec/MIME/Type.hs2
-rw-r--r--Codec/MIME/Utils.hs3
6 files changed, 16 insertions, 18 deletions
diff --git a/Codec/MIME/Base64.hs b/Codec/MIME/Base64.hs
index 33fa3b8..f60419b 100644
--- a/Codec/MIME/Base64.hs
+++ b/Codec/MIME/Base64.hs
@@ -4,7 +4,7 @@
-- Copyright : (c) 2006-2009, Galois, Inc.
-- License : BSD3
--
--- Maintainer: Sigbjorn Finne <sof@galois.com>
+-- Maintainer: Sigbjorn Finne <sigbjorn.finne@gmail.com>
-- Stability : provisional
-- Portability: portable
--
diff --git a/Codec/MIME/Decode.hs b/Codec/MIME/Decode.hs
index ea1cf00..364e0fb 100644
--- a/Codec/MIME/Decode.hs
+++ b/Codec/MIME/Decode.hs
@@ -4,7 +4,7 @@
-- Copyright : (c) 2006-2009, Galois, Inc.
-- License : BSD3
--
--- Maintainer: Sigbjorn Finne <sof@galois.com>
+-- Maintainer: Sigbjorn Finne <sigbjorn.finne@gmail.com>
-- Stability : provisional
-- Portability: portable
--
diff --git a/Codec/MIME/Parse.hs b/Codec/MIME/Parse.hs
index 488331c..df3549f 100644
--- a/Codec/MIME/Parse.hs
+++ b/Codec/MIME/Parse.hs
@@ -4,7 +4,7 @@
-- Copyright : (c) 2006-2009, Galois, Inc.
-- License : BSD3
--
--- Maintainer: Sigbjorn Finne <sof@galois.com>
+-- Maintainer: Sigbjorn Finne <sigbjorn.finne@gmail.com>
-- Stability : provisional
-- Portability: portable
--
@@ -12,8 +12,14 @@
--
--------------------------------------------------------------------
module Codec.MIME.Parse
- ( parseMIMEBody
- , parseMIMEType
+ ( parseMIMEBody -- :: [(String,String)] -> String -> MIMEValue
+ , parseMIMEType -- :: String -> Maybe Type
+ , parseMIMEMessage -- :: String -> MIMEValue
+
+ , parseHeaders -- :: String -> ([(String,String)], String)
+ , parseMultipart -- :: Type -> String -> (MIMEValue, String)
+ , parseContentType -- :: String -> Maybe Type
+ , splitMulti -- :: String -> String -> ([MIMEValue], String)
) where
import Codec.MIME.Type
@@ -75,7 +81,6 @@ parseContentDisp headers =
"form-data" -> DispFormData
_ -> DispOther t
-
processBody :: [(String,String)] -> String -> String
processBody headers body =
case lookupField "content-transfer-encoding" headers of
@@ -164,7 +169,6 @@ parseContentType str =
Just ctor -> ctor b
_ -> Other a b
-
parseParams :: String -> [(String,String)]
parseParams "" = []
parseParams (';':xs) =
@@ -199,7 +203,6 @@ mediaTypes =
'x':'-':_ -> Extension b
_ -> OtherMulti b
-
multipartTypes :: [(String, Multipart)]
multipartTypes =
[ ("alternative", Alternative)
@@ -213,7 +216,6 @@ multipartTypes =
, ("signed", Signed)
]
-
untilMatch :: String -> String -> Maybe String
untilMatch str xs = go str xs
where go "" rs = Just rs
@@ -227,14 +229,11 @@ matchUntil str xs
| str `isPrefixOf` xs = ("", drop (length str) xs)
matchUntil str (x:xs) = let (as,bs) = matchUntil str xs in (x:as,bs)
-
-
isHSpace :: Char -> Bool
isHSpace c = c == ' ' || c == '\t'
isTSpecial :: Char -> Bool
-isTSpecial x = x `elem` "()<>@,;:\\\"/[]?="
-
+isTSpecial x = x `elem` "()<>@,;:\\\"/[]?=" -- "
dropFoldingWSP :: String -> String
dropFoldingWSP "" = ""
diff --git a/Codec/MIME/QuotedPrintable.hs b/Codec/MIME/QuotedPrintable.hs
index 92e468a..cdc2266 100644
--- a/Codec/MIME/QuotedPrintable.hs
+++ b/Codec/MIME/QuotedPrintable.hs
@@ -4,11 +4,11 @@
-- Copyright : (c) 2006-2009, Galois, Inc.
-- License : BSD3
--
--- Maintainer: Sigbjorn Finne <sof@galois.com>
+-- Maintainer: Sigbjorn Finne <sigbjorn.finne@gmail.com>
-- Stability : provisional
-- Portability:
--
---
+-- To and from QP content encoding.
--
--------------------------------------------------------------------
module Codec.MIME.QuotedPrintable
diff --git a/Codec/MIME/Type.hs b/Codec/MIME/Type.hs
index 998c6b0..5b91b14 100644
--- a/Codec/MIME/Type.hs
+++ b/Codec/MIME/Type.hs
@@ -4,7 +4,7 @@
-- Copyright : (c) 2006-2009, Galois, Inc.
-- License : BSD3
--
--- Maintainer: Sigbjorn Finne <sof@galois.com>
+-- Maintainer: Sigbjorn Finne <sigbjorn.finne@gmail.com>
-- Stability : provisional
-- Portability: portable
--
diff --git a/Codec/MIME/Utils.hs b/Codec/MIME/Utils.hs
index 8c4e921..624d433 100644
--- a/Codec/MIME/Utils.hs
+++ b/Codec/MIME/Utils.hs
@@ -4,7 +4,7 @@
-- Copyright : (c) 2006-2009, Galois, Inc.
-- License : BSD3
--
--- Maintainer: Sigbjorn Finne <sof@galois.com>
+-- Maintainer: Sigbjorn Finne <sigbjorn.finne@gmail.com>
-- Stability : provisional
-- Portability: portable
--
@@ -30,4 +30,3 @@ findMultipartNamed nm mv =
return mv
where withDispName a (Name b) = a == b
withDispName _ _ = False
-