mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
http/httpguts: eschew UTF-8 decoding in ValidHeaderFieldName
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user