mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 18:40:55 +00:00
context: redirect should writer to response instantly
This commit is contained in:
parent
c4fa17921e
commit
80274684e0
@ -49,7 +49,7 @@ type Context struct {
|
|||||||
// It sends http response header directly.
|
// It sends http response header directly.
|
||||||
func (ctx *Context) Redirect(status int, localurl string) {
|
func (ctx *Context) Redirect(status int, localurl string) {
|
||||||
ctx.Output.Header("Location", localurl)
|
ctx.Output.Header("Location", localurl)
|
||||||
ctx.Output.SetStatus(status)
|
ctx.ResponseWriter.WriteHeader(status)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Abort stops this request.
|
// Abort stops this request.
|
||||||
|
Loading…
Reference in New Issue
Block a user