mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:00:54 +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 {
|
if !findrouter {
|
||||||
httpMethod := r.Method
|
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 {
|
if t, ok := p.routers[httpMethod]; ok {
|
||||||
runObject := t.Match(urlPath, context)
|
runObject := t.Match(urlPath, context)
|
||||||
if r, ok := runObject.(*controllerInfo); ok {
|
if r, ok := runObject.(*controllerInfo); ok {
|
||||||
|
Loading…
Reference in New Issue
Block a user