mirror of
https://github.com/astaxie/beego.git
synced 2024-12-23 08:00:50 +00:00
all the browser should support delete and put now
This commit is contained in:
parent
9519fc6c96
commit
6585e66f97
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user