fix(multiplexer): EnsureMethod string comparasion not properly checking method
This commit is contained in:
@@ -107,7 +107,7 @@ func EnsureMethod(methods ...string) PatternRule {
|
||||
}
|
||||
return func(s string) {
|
||||
sp := strings.Split(s, " ")
|
||||
if len(sp) <= 0 {
|
||||
if len(sp) < 2 {
|
||||
panic(fmt.Sprintf("method: pattern %q doesn't has a method", s))
|
||||
}
|
||||
if methods != nil {
|
||||
|
||||
Reference in New Issue
Block a user