summaryrefslogtreecommitdiffstats
path: root/Codec/MIME/Decode.hs
diff options
context:
space:
mode:
authorIavor S. Diatchki <diatchki@galois.com>2012-06-01 09:30:52 -0700
committerIavor S. Diatchki <diatchki@galois.com>2012-06-01 09:30:52 -0700
commitc97baa979878145c599c057d8bba01618c223178 (patch)
tree1317ef36ae3c490195d68b72422fd41b6540eb35 /Codec/MIME/Decode.hs
parent496029fc2a0922685f372f456b44780b1df61c27 (diff)
Integrate improvements from Scrive (thanks to Magnus Carlsson!)
* Codec.MIME.Parse.parseMIMEBody: stick the header argument into the returned mime_val_headers field. * Codec.MIME.Parse.parseMIMEMessage: be more tolerant about non-standard newlines. * Codec.MIME.Parse.untilMatch: fix a bug demonstrated by input "ab" "aab".
Diffstat (limited to 'Codec/MIME/Decode.hs')
-rw-r--r--Codec/MIME/Decode.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Codec/MIME/Decode.hs b/Codec/MIME/Decode.hs
index 364e0fb..278d6f6 100644
--- a/Codec/MIME/Decode.hs
+++ b/Codec/MIME/Decode.hs
@@ -27,7 +27,7 @@ import Codec.MIME.Base64 as Base64
decodeBody :: String -> String -> String
decodeBody enc body =
case map toLower enc of
- "base64" -> map (chr.fromIntegral) $ Base64.decode body
+ "base64" -> Base64.decodeToString body
"quoted-printable" -> QP.decode body
_ -> body