1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 19:40:50 +00:00

jsonp set header to javascript

This commit is contained in:
astaxie 2013-08-19 21:34:34 +08:00
parent 0b74db64eb
commit 1fedaf21ec

View File

@ -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())
}