From e3a279e457c8159c07db2db652dbe151afb51f36 Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 22 Apr 2010 14:01:08 +0000 Subject: now the PGF service communicates with Graphviz using UTF8 for the input and binary for the output --- src/server/FastCGIUtils.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/server/FastCGIUtils.hs') diff --git a/src/server/FastCGIUtils.hs b/src/server/FastCGIUtils.hs index 8d90c9fa7..43b16eea0 100644 --- a/src/server/FastCGIUtils.hs +++ b/src/server/FastCGIUtils.hs @@ -27,6 +27,7 @@ import Network.FastCGI import Text.JSON import qualified Codec.Binary.UTF8.String as UTF8 (encodeString, decodeString) +import qualified Data.ByteString.Lazy as BS initFastCGI :: IO () @@ -168,10 +169,10 @@ outputJSONP x = setHeader "Content-Type" "text/json; charset=utf-8" outputStrict $ UTF8.encodeString str -outputPNG :: String -> CGI CGIResult +outputPNG :: BS.ByteString -> CGI CGIResult outputPNG x = do setHeader "Content-Type" "image/png" - outputStrict x + outputFPS x outputHTML :: String -> CGI CGIResult outputHTML x = do -- cgit v1.2.3