Merge pull request #21 from buaazp/master

Redirect 307 instead of 302
This commit is contained in:
Aliaksandr Valialkin
2015-12-20 15:48:39 +02:00
+2 -1
View File
@@ -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