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