From 336f900849e92d38048ee6c26fe6ecab24e4ed37 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 22 Dec 2009 16:57:46 +0200 Subject: [PATCH] Fixed invalid response content types. Was using "show" instead of "convertSuccess". --- Yesod/Response.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Yesod/Response.hs b/Yesod/Response.hs index d5904229..6dc61c1c 100644 --- a/Yesod/Response.hs +++ b/Yesod/Response.hs @@ -51,6 +51,7 @@ import Test.Framework (testGroup, Test) import Data.Generics import Control.Exception (Exception) +import Data.Convertible.Text (cs) data Response = Response Int [Header] ContentType Content deriving Show @@ -101,7 +102,7 @@ responseToHackResponse :: [String] -- ^ language list -> Response -> IO Hack.Response responseToHackResponse _FIXMEls (Response sc hs ct c) = do hs' <- mapM toPair hs - let hs'' = ("Content-Type", show ct) : hs' + let hs'' = ("Content-Type", cs ct) : hs' let asLBS = unContent c return $ Hack.Response sc hs'' asLBS