X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Rakka.git;a=blobdiff_plain;f=Rakka%2FResource%2FRender.hs;h=c25ca586fc628cdafcd19dd176f19eec73342d3a;hp=778ca2114dba15d8945674510b1c70abc70c3a55;hb=b444493e17ad49d60464bb5cf02898bd9198af3c;hpb=b101c0a9aad609704eaa9157fe809be80d2aacf7 diff --git a/Rakka/Resource/Render.hs b/Rakka/Resource/Render.hs index 778ca21..c25ca58 100644 --- a/Rakka/Resource/Render.hs +++ b/Rakka/Resource/Render.hs @@ -10,6 +10,7 @@ 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 Data.Maybe import Network.HTTP.Lucu import Network.HTTP.Lucu.Utils import Rakka.Environment @@ -67,7 +68,7 @@ handleRender env name 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