mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 09:51:28 +00:00
fix #280
This commit is contained in:
parent
9e4d886a6c
commit
2a81595c3e
@ -629,7 +629,9 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
}
|
}
|
||||||
if strings.HasPrefix(strings.ToLower(requestPath), "/"+cName+"/") {
|
if strings.HasPrefix(strings.ToLower(requestPath), "/"+cName+"/") {
|
||||||
for mName, controllerType := range methodmap {
|
for mName, controllerType := range methodmap {
|
||||||
if strings.HasPrefix(strings.ToLower(requestPath), "/"+cName+"/"+strings.ToLower(mName)) {
|
if strings.ToLower(requestPath) == "/"+cName+"/"+strings.ToLower(mName) ||
|
||||||
|
(strings.HasPrefix(strings.ToLower(requestPath), "/"+cName+"/"+strings.ToLower(mName)) &&
|
||||||
|
requestPath[len("/"+cName+"/"+strings.ToLower(mName)):len("/"+cName+"/"+strings.ToLower(mName))+1] == "/") {
|
||||||
if r.Method == "POST" {
|
if r.Method == "POST" {
|
||||||
r.ParseMultipartForm(MaxMemory)
|
r.ParseMultipartForm(MaxMemory)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user