beego:update the Abort Status

This commit is contained in:
astaxie 2014-07-18 15:38:29 +08:00
parent d17f107fc4
commit 91ee42ceeb
1 changed files with 1 additions and 1 deletions

View File

@ -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)