From a9629f707e37883b491e058e03dfb870543dda75 Mon Sep 17 00:00:00 2001 From: haley Date: Sun, 28 Apr 2019 08:50:30 +0800 Subject: [PATCH] route request put amendment --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index 997b6854..e00c1b36 100644 --- a/router.go +++ b/router.go @@ -779,7 +779,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request) runRouter = routerInfo.controllerType methodParams = routerInfo.methodParams method := r.Method - if r.Method == http.MethodPost && context.Input.Query("_method") == http.MethodPost { + if r.Method == http.MethodPost && context.Input.Query("_method") == http.MethodPut { method = http.MethodPut } if r.Method == http.MethodPost && context.Input.Query("_method") == http.MethodDelete {