91ee42ce by astaxie

beego:update the Abort Status

1 parent d17f107f
...@@ -42,7 +42,7 @@ func (ctx *Context) Redirect(status int, localurl string) { ...@@ -42,7 +42,7 @@ func (ctx *Context) Redirect(status int, localurl string) {
42 // if middleware.ErrorMaps exists, panic body. 42 // if middleware.ErrorMaps exists, panic body.
43 // if middleware.HTTPExceptionMaps exists, panic HTTPException struct with status and body string. 43 // if middleware.HTTPExceptionMaps exists, panic HTTPException struct with status and body string.
44 func (ctx *Context) Abort(status int, body string) { 44 func (ctx *Context) Abort(status int, body string) {
45 ctx.Output.SetStatus(status) 45 ctx.ResponseWriter.WriteHeader(status)
46 // first panic from ErrorMaps, is is user defined error functions. 46 // first panic from ErrorMaps, is is user defined error functions.
47 if _, ok := middleware.ErrorMaps[body]; ok { 47 if _, ok := middleware.ErrorMaps[body]; ok {
48 panic(body) 48 panic(body)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!