21 lines
923 B
Diff
21 lines
923 B
Diff
--- ./modules/pkg/mod/golang.org/x/net@v0.0.0-20201022231255-08b38378de70/http/httpguts/httplex.go 2022-02-24 18:23:00.057371248 +0300
|
|
+++ ./modules/pkg/mod/golang.org/x/net@v0.0.0-20201022231255-08b38378de70/http/httpguts//my_httplex.go 2022-02-24 18:24:02.705371116 +0300
|
|
@@ -137,11 +137,13 @@
|
|
// contains token amongst its comma-separated tokens, ASCII
|
|
// case-insensitively.
|
|
func headerValueContainsToken(v string, token string) bool {
|
|
- v = trimOWS(v)
|
|
- if comma := strings.IndexByte(v, ','); comma != -1 {
|
|
- return tokenEqual(trimOWS(v[:comma]), token) || headerValueContainsToken(v[comma+1:], token)
|
|
+ for comma := strings.IndexByte(v, ','); comma != -1; comma = strings.IndexByte(v, ',') {
|
|
+ if tokenEqual(trimOWS(v[:comma]), token) {
|
|
+ return true
|
|
+ }
|
|
+ v = v[comma+1:]
|
|
}
|
|
- return tokenEqual(v, token)
|
|
+ return tokenEqual(trimOWS(v), token)
|
|
}
|
|
|
|
// lowerASCII returns the ASCII lowercase version of b.
|