This commit is contained in:
crusader 2018-04-10 23:08:55 +09:00
parent 36a4d42bb8
commit cb16130245

View File

@ -47,11 +47,13 @@ func (s *RESTServlets) Handle(servletCtx server.ServletCtx, ctx *fasthttp.Reques
method := string(ctx.Method()) method := string(ctx.Method())
path := string(ctx.Path()) path := string(ctx.Path())
requestPath := s.RequestPath(ctx)
es, ok := s.methodMapping[method] es, ok := s.methodMapping[method]
if !ok { if !ok {
return csw.NewError(fasthttp.StatusNotFound, fmt.Errorf("Not Found for [%s]%s", method, path)) return csw.NewError(fasthttp.StatusNotFound, fmt.Errorf("Not Found for [%s]%s", method, path))
} }
mapping, ok := es[path] mapping, ok := es[requestPath]
if !ok { if !ok {
return csw.NewError(fasthttp.StatusNotFound, fmt.Errorf("Not Found for [%s]%s", method, path)) return csw.NewError(fasthttp.StatusNotFound, fmt.Errorf("Not Found for [%s]%s", method, path))
} }