From 91ee42ceeb9a9b6ff4f4ecfbe1258bd73dcbfe33 Mon Sep 17 00:00:00 2001 From: astaxie Date: Fri, 18 Jul 2014 15:38:29 +0800 Subject: [PATCH] beego:update the Abort Status --- context/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/context.go b/context/context.go index 8ef8233f..c6517e62 100644 --- a/context/context.go +++ b/context/context.go @@ -42,7 +42,7 @@ func (ctx *Context) Redirect(status int, localurl string) { // if middleware.ErrorMaps exists, panic body. // if middleware.HTTPExceptionMaps exists, panic HTTPException struct with status and body string. func (ctx *Context) Abort(status int, body string) { - ctx.Output.SetStatus(status) + ctx.ResponseWriter.WriteHeader(status) // first panic from ErrorMaps, is is user defined error functions. if _, ok := middleware.ErrorMaps[body]; ok { panic(body)