Redirect 307 instead of 302

This commit is contained in:
招牌疯子
2015-12-20 12:32:45 +08:00
parent d54fa3f450
commit abc35a8dc2
+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