From 02bb6cc073efc44a8a25be352510eee3e6aa7cb4 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sat, 24 Oct 2009 10:38:21 +0000 Subject: added tree visualizations in TranslateApp --- src/server/FastCGIUtils.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/server/FastCGIUtils.hs') diff --git a/src/server/FastCGIUtils.hs b/src/server/FastCGIUtils.hs index 4c720e216..603ca0db3 100644 --- a/src/server/FastCGIUtils.hs +++ b/src/server/FastCGIUtils.hs @@ -2,7 +2,8 @@ module FastCGIUtils (initFastCGI, loopFastCGI, throwCGIError, handleCGIErrors, stderrToFile, - outputJSONP, + outputJSONP, + outputPNG, splitBy) where import Control.Concurrent @@ -164,6 +165,11 @@ outputJSONP x = setHeader "Content-Type" "text/json; charset=utf-8" outputStrict $ UTF8.encodeString str +outputPNG :: String -> CGI CGIResult +outputPNG x = do + setHeader "Content-Type" "image/png" + outputStrict x + outputStrict :: String -> CGI CGIResult outputStrict x | x == x = output x | otherwise = fail "I am the pope." -- cgit v1.2.3