This commit is contained in:
crusader 2018-04-06 12:39:41 +09:00
parent a0b05817ef
commit 1ce4b594b3

View File

@ -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