diff --git a/middleware/error.go b/middleware/error.go index d154a09b..5ef635f6 100644 --- a/middleware/error.go +++ b/middleware/error.go @@ -194,7 +194,7 @@ func NotFound(rw http.ResponseWriter, r *http.Request) { "
You like 404 pages" + "") data["BeegoVersion"] = VERSION - rw.WriteHeader(http.StatusNotFound) + //rw.WriteHeader(http.StatusNotFound) t.Execute(rw, data) } @@ -210,7 +210,7 @@ func Unauthorized(rw http.ResponseWriter, r *http.Request) { "
Check the address for errors" + "") data["BeegoVersion"] = VERSION - rw.WriteHeader(http.StatusUnauthorized) + //rw.WriteHeader(http.StatusUnauthorized) t.Execute(rw, data) } @@ -227,7 +227,7 @@ func Forbidden(rw http.ResponseWriter, r *http.Request) { "
You need to log in" + "") data["BeegoVersion"] = VERSION - rw.WriteHeader(http.StatusForbidden) + //rw.WriteHeader(http.StatusForbidden) t.Execute(rw, data) } @@ -243,7 +243,7 @@ func ServiceUnavailable(rw http.ResponseWriter, r *http.Request) { "
Please try again later." + "") data["BeegoVersion"] = VERSION - rw.WriteHeader(http.StatusServiceUnavailable) + //rw.WriteHeader(http.StatusServiceUnavailable) t.Execute(rw, data) } @@ -258,7 +258,7 @@ func InternalServerError(rw http.ResponseWriter, r *http.Request) { "
you should report the fault to the website administrator" + "") data["BeegoVersion"] = VERSION - rw.WriteHeader(http.StatusInternalServerError) + //rw.WriteHeader(http.StatusInternalServerError) t.Execute(rw, data) } diff --git a/router.go b/router.go index 8f29a52c..17326330 100644 --- a/router.go +++ b/router.go @@ -406,6 +406,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) if ErrorsShow { handler := p.getErrorHandler(fmt.Sprint(err)) handler(rw, r) + return } else { Critical("Handler crashed with error", err) for i := 1; ; i++ {