1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-23 18:54:13 +00:00

all the browser should support delete and put now

This commit is contained in:
astaxie 2016-01-03 20:36:16 +08:00
parent 9519fc6c96
commit 6585e66f97

View File

@ -664,12 +664,6 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if !findrouter {
httpMethod := r.Method
if httpMethod == "POST" && context.Input.Query("_method") == "PUT" {
httpMethod = "PUT"
}
if httpMethod == "POST" && context.Input.Query("_method") == "DELETE" {
httpMethod = "DELETE"
}
if t, ok := p.routers[httpMethod]; ok {
runObject := t.Match(urlPath, context)
if r, ok := runObject.(*controllerInfo); ok {