From d17f107fc4bf5c09d2af70ef4a36737210dcb83a Mon Sep 17 00:00:00 2001 From: astaxie Date: Fri, 18 Jul 2014 13:29:54 +0800 Subject: [PATCH] beego: fix #702 auto render --- router.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/router.go b/router.go index ba0d0b60..f66915cb 100644 --- a/router.go +++ b/router.go @@ -720,12 +720,11 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) } //render template - if !w.started { + if !w.started && context.Output.Status == 0 { if AutoRender { if err := execController.Render(); err != nil { panic(err) } - } } }