This commit is contained in:
Maxim Merzhanov authored and Maxim committed 2019-11-22 18:30:33 +03:00
1 parent 2bbc426bef
commit 4553cd0261
2 files changed
+5 -6

No files matched your search

-1
View File
@@ -13,7 +13,6 @@ import (
const (
ApplyCommandEvent = "CONFIG_CLUSTER:APPLY_COMMAND"
TokenParam = "token"
ClusterParam = "cluster"
)
const (
+5 -5
View File
@@ -1,7 +1,7 @@
package mux
import (
"strings"
"bytes"
)
type Matcher func([]byte) bool
@@ -34,11 +34,11 @@ func HTTP1() Matcher {
l = len(data)
}
methodB := data[:l]
ss := strings.Split(string(methodB), " ")
if len(ss) == 0 {
words := bytes.Split(methodB, []byte(" "))
if len(words) == 0 {
return false
}
_, knownMethod := httpMethods[ss[0]]
return knownMethod
_, ok := httpMethods[string(words[0])]
return ok
}
}