- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for HeaderValuesContainsToken (0.27 sec)
-
pkg/h2c/wrapper.go
_, _ = w.Write([]byte("h2c upgrade not allowed")) return } h.ServeHTTP(w, r) }) } func isH2CUpgrade(h http.Header) bool { return httpguts.HeaderValuesContainsToken(h[textproto.CanonicalMIMEHeaderKey("Upgrade")], "h2c") && httpguts.HeaderValuesContainsToken(h[textproto.CanonicalMIMEHeaderKey("Connection")], "HTTP2-Settings")
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Nov 09 08:02:48 UTC 2022 - 1.7K bytes - Viewed (0) -
src/vendor/golang.org/x/net/http/httpguts/httplex.go
'z': true, '|': true, '~': true, } func IsTokenRune(r rune) bool { return r < utf8.RuneSelf && isTokenTable[byte(r)] } // HeaderValuesContainsToken reports whether any string in values // contains the provided token, ASCII case-insensitively. func HeaderValuesContainsToken(values []string, token string) bool { for _, v := range values { if headerValueContainsToken(v, token) { return true } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 8.7K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy.go
// advertise that unless the incoming client request thought it was worth // mentioning.) Note that we look at req.Header, not outreq.Header, since // the latter has passed through removeHopByHopHeaders. if httpguts.HeaderValuesContainsToken(req.Header["Te"], "trailers") { outreq.Header.Set("Te", "trailers") } // After stripping all the hop-by-hop connection headers above, add back any
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 23:37:42 UTC 2024 - 24.9K bytes - Viewed (0) -
src/net/http/response.go
} // isProtocolSwitchHeader reports whether the request or response header // is for a protocol switch. func isProtocolSwitchHeader(h Header) bool { return h.Get("Upgrade") != "" && httpguts.HeaderValuesContainsToken(h["Connection"], "Upgrade")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 11.1K bytes - Viewed (0) -
src/net/http/transfer.go
if major < 1 { return true } conv := header["Connection"] hasClose := httpguts.HeaderValuesContainsToken(conv, "close") if major == 1 && minor == 0 { return hasClose || !httpguts.HeaderValuesContainsToken(conv, "keep-alive") } if hasClose && removeCloseHeader { header.Del("Connection") } return hasClose }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 22:14:00 UTC 2024 - 31.1K bytes - Viewed (0) -
src/net/http/h2_bundle.go
sc.serveG.check() var tlsState *tls.ConnectionState // nil if not scheme https if rp.scheme == "https" { tlsState = sc.tlsState } needsContinue := httpguts.HeaderValuesContainsToken(rp.header["Expect"], "100-continue") if needsContinue { rp.header.Del("Expect") } // Merge Cookie headers into one "; "-delimited value. if cookies := rp.header["Cookie"]; len(cookies) > 1 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 364.1K bytes - Viewed (0) -
src/net/http/transport_test.go
} count := 0 trace := &httptrace.ClientTrace{ WroteHeaderField: func(key string, field []string) { if key != "Connection" { return } if httpguts.HeaderValuesContainsToken(field, "close") { count += 1 } }, } req = req.WithContext(httptrace.WithClientTrace(req.Context(), trace)) req.Close = tc.close res, err := c.Do(req)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0)