fix bug
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -199,7 +199,7 @@ func (c *Controller) ServeJson() { | ... | @@ -199,7 +199,7 @@ func (c *Controller) ServeJson() { |
| 199 | return | 199 | return |
| 200 | } | 200 | } |
| 201 | c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) | 201 | c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) |
| 202 | ctx.ResponseWriter.Header().Set("Content-Type", "application/json") | 202 | c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/json") |
| 203 | c.Ctx.ResponseWriter.Write(content) | 203 | c.Ctx.ResponseWriter.Write(content) |
| 204 | } | 204 | } |
| 205 | 205 | ||
| ... | @@ -210,7 +210,7 @@ func (c *Controller) ServeXml() { | ... | @@ -210,7 +210,7 @@ func (c *Controller) ServeXml() { |
| 210 | return | 210 | return |
| 211 | } | 211 | } |
| 212 | c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) | 212 | c.Ctx.SetHeader("Content-Length", strconv.Itoa(len(content)), true) |
| 213 | ctx.ResponseWriter.Header().Set("Content-Type", "application/xml") | 213 | c.Ctx.ResponseWriter.Header().Set("Content-Type", "application/xml") |
| 214 | c.Ctx.ResponseWriter.Write(content) | 214 | c.Ctx.ResponseWriter.Write(content) |
| 215 | } | 215 | } |
| 216 | 216 | ... | ... |
-
Please register or sign in to post a comment