diff --git a/cluster/const.go b/cluster/const.go index 6f599fc..c9b6011 100644 --- a/cluster/const.go +++ b/cluster/const.go @@ -13,7 +13,6 @@ import ( const ( ApplyCommandEvent = "CONFIG_CLUSTER:APPLY_COMMAND" - TokenParam = "token" ClusterParam = "cluster" ) const ( diff --git a/mux/matchers.go b/mux/matchers.go index cdc365f..e2490db 100644 --- a/mux/matchers.go +++ b/mux/matchers.go @@ -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 } }