From cb161302457515e022cf215a22c6bafda84b1316 Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 10 Apr 2018 23:08:55 +0900 Subject: [PATCH] ing --- servlet/rest-servlet.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) }