From abc35a8dc2d49a44fb2f8412f8f1114d0374b2ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=8B=9B=E7=89=8C=E7=96=AF=E5=AD=90?= Date: Sun, 20 Dec 2015 12:32:45 +0800 Subject: [PATCH] Redirect 307 instead of 302 --- server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index e3437ac..dfd5f20 100644 --- a/server.go +++ b/server.go @@ -650,7 +650,8 @@ func (ctx *RequestCtx) redirect(uri []byte, statusCode int) { } func getRedirectStatusCode(statusCode int) int { - if statusCode == StatusMovedPermanently || statusCode == StatusFound || statusCode == StatusSeeOther { + if statusCode == StatusMovedPermanently || statusCode == StatusFound || + statusCode == StatusSeeOther || statusCode == StatusTemporaryRedirect { return statusCode } return StatusFound