diff --git a/web/fasthttp/server-handler.go b/web/fasthttp/server-handler.go index cd3bb5d..b2eb11c 100644 --- a/web/fasthttp/server-handler.go +++ b/web/fasthttp/server-handler.go @@ -96,10 +96,6 @@ func (sh *ServerHandlers) Validate() error { return err } - if nil == sh.NotFoundServelt { - return fmt.Errorf("NotFoundServelt must to set") - } - return nil } @@ -109,6 +105,7 @@ func getContextPath(path string) (string, error) { if !strings.HasPrefix(p, "/") { return "", fmt.Errorf("The path[%s] must started /", path) } + p = p[1:] if strings.HasSuffix(p, "/") { cpl := len(p) - 1