Commit 1fedaf21 authored by astaxie's avatar astaxie

jsonp set header to javascript

parent 0b74db64
......@@ -255,7 +255,7 @@ func (c *Controller) ServeJsonp() {
callback_content.WriteString("(")
callback_content.Write(content)
callback_content.WriteString(");\r\n")
c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/json;charset=UTF-8")
c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/javascript;charset=UTF-8")
c.writeToWriter(callback_content.Bytes())
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment