mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 20:10:55 +00:00
Merge pull request #2341 from kabab/content_type
Changing content type for template
This commit is contained in:
commit
fa12dcf792
@ -185,7 +185,11 @@ func (c *Controller) Render() error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if c.Ctx.ResponseWriter.Header().Get("Content-Type") == "" {
|
||||||
c.Ctx.Output.Header("Content-Type", "text/html; charset=utf-8")
|
c.Ctx.Output.Header("Content-Type", "text/html; charset=utf-8")
|
||||||
|
}
|
||||||
|
|
||||||
return c.Ctx.Output.Body(rb)
|
return c.Ctx.Output.Body(rb)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user