1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 19:10:54 +00:00

Remove panic from Redirect()

This `panic(ErrAbort)` is unnecessary in `Redirect` function and causes problems in the production code.
This commit is contained in:
Ilya Danilkin 2018-08-12 05:11:03 +03:00 committed by GitHub
parent 053a075344
commit 1a3dcb4f84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,7 +275,6 @@ func (c *Controller) viewPath() string {
func (c *Controller) Redirect(url string, code int) { func (c *Controller) Redirect(url string, code int) {
logAccess(c.Ctx, nil, code) logAccess(c.Ctx, nil, code)
c.Ctx.Redirect(code, url) c.Ctx.Redirect(code, url)
panic(ErrAbort)
} }
// Set the data depending on the accepted // Set the data depending on the accepted