b2abb4eb by astaxie

fix #66

1 parent 951881b9
...@@ -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
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!