use http method constant (#2155)

* use http method constant

* fix typo
This commit is contained in:
thinkerou
2019-11-29 07:50:49 +08:00
committed by GitHub
parent 352d69c71f
commit d5f12ac6d7
8 changed files with 369 additions and 369 deletions
+1 -1
View File
@@ -490,7 +490,7 @@ func redirectRequest(c *Context) {
rURL := req.URL.String()
code := http.StatusMovedPermanently // Permanent redirect, request with GET method
if req.Method != "GET" {
if req.Method != http.MethodGet {
code = http.StatusTemporaryRedirect
}
debugPrint("redirecting request %d: %s --> %s", code, rPath, rURL)