Commit d17f107f authored by astaxie's avatar astaxie

beego: fix #702 auto render

parent ae8bb8ce
...@@ -720,12 +720,11 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -720,12 +720,11 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
} }
//render template //render template
if !w.started { if !w.started && context.Output.Status == 0 {
if AutoRender { if AutoRender {
if err := execController.Render(); err != nil { if err := execController.Render(); err != nil {
panic(err) panic(err)
} }
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment