@@ -45,6 +45,7 @@ import Control.Monad (when, unless)
4545import Control.Monad.Trans.Resource (allocate, release, register, InternalState, runInternalState)
4646import Data.IORef
4747import Network.HTTP.Types (hContentType)
48+import Data.CaseInsensitive (mk)
4849
4950breakDiscard :: Word8 -> S.ByteString -> (S.ByteString, S.ByteString)
5051breakDiscard w s =
@@ -300,11 +301,11 @@ parsePieces sink bound rbody add =
300301 (wasFound, ()) <- sinkTillBound bound iter seed src
301302 when wasFound (loop src)
302303 where
303− contDisp = S8.pack "Content-Disposition"
304− contType = S8.pack "Content-Type"
304+ contDisp = mk $ S8.pack "Content-Disposition"
305+ contType = mk $ S8.pack "Content-Type"
305306 parsePair s =
306307 let (x, y) = breakDiscard 58 s -- colon
307− in (x, S.dropWhile (== 32) y) -- space
308+ in (mk $ x, S.dropWhile (== 32) y) -- space
308309
309310data Bound = FoundBound S.ByteString S.ByteString
310311 | NoBound