1
0
forked from GitHub/gf-core

PGF web service: Use Content-Type text/javascript from JSON output

The Content-Type used to be text/json, but this caused warning messages in
some web browers.
This commit is contained in:
hallgren
2010-12-22 14:47:35 +00:00
parent 4c48dc3bc2
commit 681c5d25dd

View File

@@ -165,7 +165,7 @@ outputJSONP x =
let str = case mc of
Nothing -> encode x
Just c -> c ++ "(" ++ encode x ++ ")"
setHeader "Content-Type" "text/json; charset=utf-8"
setHeader "Content-Type" "text/javascript; charset=utf-8"
outputStrict $ UTF8.encodeString str
outputPNG :: BS.ByteString -> CGI CGIResult