80274684 by astaxie

context: redirect should writer to response instantly

1 parent c4fa1792
...@@ -49,7 +49,7 @@ type Context struct { ...@@ -49,7 +49,7 @@ type Context struct {
49 // It sends http response header directly. 49 // It sends http response header directly.
50 func (ctx *Context) Redirect(status int, localurl string) { 50 func (ctx *Context) Redirect(status int, localurl string) {
51 ctx.Output.Header("Location", localurl) 51 ctx.Output.Header("Location", localurl)
52 ctx.Output.SetStatus(status) 52 ctx.ResponseWriter.WriteHeader(status)
53 } 53 }
54 54
55 // Abort stops this request. 55 // Abort stops this request.
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!