beego: fix #702 auto render
Showing
1 changed file
with
1 additions
and
2 deletions
| ... | @@ -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 | } | ... | ... |
-
Please register or sign in to post a comment