From 80274684e0bf07543d890fbb05f1c3780d157a30 Mon Sep 17 00:00:00 2001 From: astaxie Date: Tue, 19 Aug 2014 09:48:21 +0800 Subject: [PATCH] context: redirect should writer to response instantly --- context/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context/context.go b/context/context.go index 1f683ff5..d31076d4 100644 --- a/context/context.go +++ b/context/context.go @@ -49,7 +49,7 @@ type Context struct { // It sends http response header directly. func (ctx *Context) Redirect(status int, localurl string) { ctx.Output.Header("Location", localurl) - ctx.Output.SetStatus(status) + ctx.ResponseWriter.WriteHeader(status) } // Abort stops this request.