mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 18:59:32 -06:00
now the PGF service communicates with Graphviz using UTF8 for the input and binary for the output
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user