fix #66
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -212,7 +212,7 @@ func (c *Controller) ServeJson() { | ... | @@ -212,7 +212,7 @@ func (c *Controller) ServeJson() { |
| 212 | return | 212 | return |
| 213 | } | 213 | } |
| 214 | c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) | 214 | c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) |
| 215 | c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/json") | 215 | c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/json;charset=UTF-8") |
| 216 | c.Ctx.ResponseWriter.Write(content) | 216 | c.Ctx.ResponseWriter.Write(content) |
| 217 | } | 217 | } |
| 218 | 218 | ||
| ... | @@ -223,7 +223,7 @@ func (c *Controller) ServeXml() { | ... | @@ -223,7 +223,7 @@ func (c *Controller) ServeXml() { |
| 223 | return | 223 | return |
| 224 | } | 224 | } |
| 225 | c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) | 225 | c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) |
| 226 | c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/xml") | 226 | c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/xml;charset=UTF-8") |
| 227 | c.Ctx.ResponseWriter.Write(content) | 227 | c.Ctx.ResponseWriter.Write(content) |
| 228 | } | 228 | } |
| 229 | 229 | ... | ... |
-
Please register or sign in to post a comment