Skip to content

Commit

Permalink
all the browser should support delete and put now
Browse files Browse the repository at this point in the history
  • Loading branch information
astaxie committed Jan 3, 2016
1 parent 9519fc6 commit 6585e66
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6585e66

Please sign in to comment.