This commit is contained in:
crusader 2018-04-06 12:45:40 +09:00
parent 43e6fe1916
commit e059d8e0fd

View File

@ -76,11 +76,7 @@ func (sh *ServerHandlers) Servlet(serverCtx server.ServerCtx, ctx *fasthttp.Requ
}
var servlet Servlet
if contextPath == "" && len(sh.servlets) == 1 {
for _, s := range sh.servlets {
servlet = s
}
} else if servlet = sh.servlets[contextPath]; nil == servlet {
if servlet = sh.servlets[contextPath]; nil == servlet {
return sh.NotFoundServelt
}