d17f107f by astaxie

beego: fix #702 auto render

1 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)
720 } 720 }
721 721
722 //render template 722 //render template
723 if !w.started { 723 if !w.started && context.Output.Status == 0 {
724 if AutoRender { 724 if AutoRender {
725 if err := execController.Render(); err != nil { 725 if err := execController.Render(); err != nil {
726 panic(err) 726 panic(err)
727 } 727 }
728
729 } 728 }
730 } 729 }
731 } 730 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!