summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIavor S. Diatchki <diatchki@galois.com>2008-09-05 14:49:21 -0700
committerIavor S. Diatchki <diatchki@galois.com>2008-09-05 14:49:21 -0700
commite3666facbb2d60576d8a4f8c6b068d12565f6643 (patch)
treef90cd9eb7438477ec1c2a1ff0bab1d535fb4a7fd
parentc2fa80a0ec94541f9671f16676aeeca2cb79f988 (diff)
Make parsing parameters case insensitive.
Thanks to Nicolas Pouillard for reporting this, and sending us a patch.
-rw-r--r--Codec/MIME/Parse.hs3
-rw-r--r--mime.cabal2
2 files changed, 3 insertions, 2 deletions
diff --git a/Codec/MIME/Parse.hs b/Codec/MIME/Parse.hs
index 22ba88c..f82824d 100644
--- a/Codec/MIME/Parse.hs
+++ b/Codec/MIME/Parse.hs
@@ -157,7 +157,8 @@ parseParams :: String -> [(String,String)]
parseParams "" = []
parseParams (';':xs) =
case break (=='=') (dropFoldingWSP xs) of
- (nm,_:vs) ->
+ (nm1,_:vs) ->
+ let nm = map toLower nm1 in
case vs of
'"':vs1 ->
case break (=='"') vs1 of
diff --git a/mime.cabal b/mime.cabal
index b7ca139..ad28581 100644
--- a/mime.cabal
+++ b/mime.cabal
@@ -1,5 +1,5 @@
name: mime
-version: 0.2
+version: 0.2.1
synopsis: Working with MIME types.
description: Working with MIME types.
category: Codec