From 2c4460d7cc42f8e6f915f36ff80f5cb6937c57a7 Mon Sep 17 00:00:00 2001 From: Alexander Nyquist Date: Tue, 29 Jul 2014 00:51:34 +0200 Subject: [PATCH] Fixed status code when redirecting --- context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/context.go b/context.go index 65a3c5cc..ccad913e 100644 --- a/context.go +++ b/context.go @@ -247,9 +247,9 @@ func (c *Context) String(code int, format string, values ...interface{}) { c.Render(code, render.Plain, format, values) } -// Returns a 302 redirect to the specific location. +// Returns a HTTP redirect to the specific location. func (c *Context) Redirect(location string, code int) { - c.Render(302, render.Redirect, location, code) + c.Render(code, render.Redirect, location, code) } // Writes some data into the body stream and updates the HTTP code.