2a81595c by astaxie

fix #280

1 parent 9e4d886a
...@@ -629,7 +629,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request) ...@@ -629,7 +629,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
629 } 629 }
630 if strings.HasPrefix(strings.ToLower(requestPath), "/"+cName+"/") { 630 if strings.HasPrefix(strings.ToLower(requestPath), "/"+cName+"/") {
631 for mName, controllerType := range methodmap { 631 for mName, controllerType := range methodmap {
632 if strings.HasPrefix(strings.ToLower(requestPath), "/"+cName+"/"+strings.ToLower(mName)) { 632 if strings.ToLower(requestPath) == "/"+cName+"/"+strings.ToLower(mName) ||
633 (strings.HasPrefix(strings.ToLower(requestPath), "/"+cName+"/"+strings.ToLower(mName)) &&
634 requestPath[len("/"+cName+"/"+strings.ToLower(mName)):len("/"+cName+"/"+strings.ToLower(mName))+1] == "/") {
633 if r.Method == "POST" { 635 if r.Method == "POST" {
634 r.ParseMultipartForm(MaxMemory) 636 r.ParseMultipartForm(MaxMemory)
635 } 637 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!