diff options
| author | krasimir <krasimir@chalmers.se> | 2009-10-24 10:38:21 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-10-24 10:38:21 +0000 |
| commit | 02bb6cc073efc44a8a25be352510eee3e6aa7cb4 (patch) | |
| tree | 9afc4b98fed029a5e42e463f54267dd42e518d7b /src/server/FastCGIUtils.hs | |
| parent | 59172a0380cc0c9553b2146af1600bbcacde0b2a (diff) | |
added tree visualizations in TranslateApp
Diffstat (limited to 'src/server/FastCGIUtils.hs')
| -rw-r--r-- | src/server/FastCGIUtils.hs | 8 |
1 files changed, 7 insertions, 1 deletions
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." |
