diff --git a/Happstack/Server/Heist.hs b/Happstack/Server/Heist.hs
--- a/Happstack/Server/Heist.hs
+++ b/Happstack/Server/Heist.hs
@@ -9,6 +9,7 @@
     , render
     ) where
 
+import Blaze.ByteString.Builder                (toLazyByteString)
 import Control.Monad                           (MonadPlus(mzero), msum)
 import Control.Monad.Trans                     (MonadIO)
 import           Data.ByteString.Char8         (ByteString)
@@ -44,10 +45,10 @@
 -- | render the specified template
 render:: (MonadPlus m, MonadIO m) => 
          TemplateDirectory m  -- ^ 'TemplateDirectory' handle
-      -> ByteString -- ^ template name
+      -> ByteString           -- ^ template name
       -> m Response
 render td template = do
     ts    <- getDirectoryTS td
-    bytes <- renderTemplate ts template
-    flip (maybe mzero) bytes $ \x -> do
-        return (toResponseBS (B.pack "text/html; charset=utf-8") (L.fromChunks [x]))
+    t     <- renderTemplate ts template
+    flip (maybe mzero) t $ \(builder, mimeType) -> do
+        return (toResponseBS mimeType (toLazyByteString builder))
diff --git a/happstack-heist.cabal b/happstack-heist.cabal
--- a/happstack-heist.cabal
+++ b/happstack-heist.cabal
@@ -1,5 +1,5 @@
 Name:                happstack-heist
-Version:             0.5.1
+Version:             6.0.0
 Synopsis:            Support for using Heist templates in Happstack
 Description:         Happstack is a web application framework. Heist is an XML templating solution. This package makes it easy to use Heist templates with Happstack.
 Homepage:            http://www.happstack.com/
@@ -20,9 +20,10 @@
 Library
   Exposed-modules:     Happstack.Server.Heist
   Build-depends:       base >= 3.0 && < 5.0,
+                       blaze-builder >= 0.2 && <0.3,
                        bytestring == 0.9.*,
                        filepath,
-                       happstack-server >= 0.5.0.3 && < 7,
-                       heist == 0.2.*,
+                       happstack-server >= 6.0 && < 6.1,
+                       heist >= 0.5 && < 0.6,
                        hexpat == 0.19.*,
                        mtl == 2.*
