Skip to content

Commit

Permalink
http/httpguts: eschew UTF-8 decoding in ValidHeaderFieldName
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Cretel committed Apr 10, 2024
1 parent edec337 commit 1f1d25d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/httpguts/httplex.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 1f1d25d

Please sign in to comment.