diff --git a/http/httpguts/httplex.go b/http/httpguts/httplex.go index cf96e583..9b4de940 100644 --- a/http/httpguts/httplex.go +++ b/http/httpguts/httplex.go @@ -197,8 +197,8 @@ func ValidHeaderFieldName(v string) bool { if len(v) == 0 { return false } - for _, r := range v { - if !IsTokenRune(r) { + for i := 0; i < len(v); i++ { + if !isTokenTable[v[i]] { return false } }