beego:update the Abort Status
Showing
1 changed file
with
1 additions
and
1 deletions
| ... | @@ -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) | ... | ... |
-
Please register or sign in to post a comment