]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/MultipartForm.hs
Exodus to GHC 6.8.1
[Lucu.git] / Network / HTTP / Lucu / MultipartForm.hs
index 21fca67b8519f2a13d29c5c11cfbda6a116c5c18..8903d7f88d3c4736faccf4aaacf6c3d8361c98cd 100644 (file)
@@ -3,8 +3,8 @@ module Network.HTTP.Lucu.MultipartForm
     )
     where
 
-import           Data.ByteString.Base (LazyByteString(..))
 import qualified Data.ByteString.Char8 as C8
+import qualified Data.ByteString.Lazy.Char8 as L8
 import           Data.Char
 import           Data.List
 import           Network.HTTP.Lucu.Abortion
@@ -78,13 +78,13 @@ partToPair part@(Part _ body)
         Nothing  
             -> abortPurely BadRequest []
                (Just "There is a part without Content-Disposition in the multipart/form-data.")
-        Just dispo
-            -> case parse contDispoP (LPS [dispo]) of
+        Just dispoStr
+            -> case parse contDispoP (L8.fromChunks [dispoStr]) of
                  (# Success dispo, _ #)
                      -> (getName dispo, body)
                  (# _, _ #)
                      -> abortPurely BadRequest []
-                        (Just $ "Unparsable Content-Disposition: " ++ C8.unpack dispo)
+                        (Just $ "Unparsable Content-Disposition: " ++ C8.unpack dispoStr)
       where
         getName :: ContDispo -> String
         getName dispo@(ContDispo dType dParams)