import Control.Monad.Trans
import qualified Data.ByteString.Lazy as Lazy (ByteString, pack)
import qualified Data.ByteString.Lazy.Char8 as L8 hiding (ByteString)
+import Data.Maybe
import Network.HTTP.Lucu
import Network.HTTP.Lucu.Utils
import Rakka.Environment
let (bin, cType) = case cTypeM of
Just (MIMEType "application" "x-rakka-base64-stream" _)
- -> let b = Lazy.pack $ B64.decode $ L8.unpack entity
+ -> let b = Lazy.pack $ fromJust $ B64.decode $ L8.unpack entity
in
(b, guessMIMEType b)
Just t