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