mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:50:56 +00:00
commit
cef91db28e
@ -69,10 +69,8 @@ func (ctx *Context) Reset(rw http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Redirect does redirection to localurl with http header status code.
|
// Redirect does redirection to localurl with http header status code.
|
||||||
// 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)
|
http.Redirect(ctx.ResponseWriter, ctx.Request, localurl, status)
|
||||||
ctx.ResponseWriter.WriteHeader(status)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Abort stops this request.
|
// Abort stops this request.
|
||||||
|
Loading…
Reference in New Issue
Block a user