1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 08:20:55 +00:00

route request put amendment

This commit is contained in:
haley 2019-04-28 08:50:30 +08:00
parent 1b6edafc96
commit a9629f707e

View File

@ -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 {