Commit 80274684 authored by astaxie's avatar astaxie

context: redirect should writer to response instantly

parent c4fa1792
...@@ -49,7 +49,7 @@ type Context struct { ...@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment