forked from GitHub/gf-core
added tree visualizations in TranslateApp
This commit is contained in:
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user