diff options
| author | krasimir <krasimir@chalmers.se> | 2010-04-22 14:01:08 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-04-22 14:01:08 +0000 |
| commit | e3a279e457c8159c07db2db652dbe151afb51f36 (patch) | |
| tree | c3cf73a14297d7c40288b7403f4d778282032a6b /src/server/FastCGIUtils.hs | |
| parent | ba7467a550b83c942fbeb414667697337d3ca3a9 (diff) | |
now the PGF service communicates with Graphviz using UTF8 for the input and binary for the output
Diffstat (limited to 'src/server/FastCGIUtils.hs')
| -rw-r--r-- | src/server/FastCGIUtils.hs | 5 |
1 files changed, 3 insertions, 2 deletions
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 |
