ing
This commit is contained in:
parent
a0b05817ef
commit
1ce4b594b3
|
@ -96,10 +96,6 @@ func (sh *ServerHandlers) Validate() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if nil == sh.NotFoundServelt {
|
|
||||||
return fmt.Errorf("NotFoundServelt must to set")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,6 +105,7 @@ func getContextPath(path string) (string, error) {
|
||||||
if !strings.HasPrefix(p, "/") {
|
if !strings.HasPrefix(p, "/") {
|
||||||
return "", fmt.Errorf("The path[%s] must started /", path)
|
return "", fmt.Errorf("The path[%s] must started /", path)
|
||||||
}
|
}
|
||||||
|
p = p[1:]
|
||||||
|
|
||||||
if strings.HasSuffix(p, "/") {
|
if strings.HasSuffix(p, "/") {
|
||||||
cpl := len(p) - 1
|
cpl := len(p) - 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user