ing
This commit is contained in:
parent
36a4d42bb8
commit
cb16130245
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user