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:
@@ -165,7 +165,7 @@ outputJSONP x =
|
|||||||
let str = case mc of
|
let str = case mc of
|
||||||
Nothing -> encode x
|
Nothing -> encode x
|
||||||
Just c -> c ++ "(" ++ 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
|
outputStrict $ UTF8.encodeString str
|
||||||
|
|
||||||
outputPNG :: BS.ByteString -> CGI CGIResult
|
outputPNG :: BS.ByteString -> CGI CGIResult
|
||||||
|
|||||||
Reference in New Issue
Block a user