- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for CanonicalMIMEHeaderKey (0.4 sec)
-
src/net/textproto/header.go
// used to canonicalize the provided key. To use non-canonical // keys, access the map directly. // The returned slice is not a copy. func (h MIMEHeader) Values(key string) []string { if h == nil { return nil } return h[CanonicalMIMEHeaderKey(key)] } // Del deletes the values associated with key. func (h MIMEHeader) Del(key string) { delete(h, CanonicalMIMEHeaderKey(key))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 1.7K bytes - Viewed (0) -
src/net/textproto/header_test.go
{"foo bar", "foo bar"}, } func TestCanonicalMIMEHeaderKey(t *testing.T) { for _, tt := range canonicalHeaderKeyTests { if s := CanonicalMIMEHeaderKey(tt.in); s != tt.out { t.Errorf("CanonicalMIMEHeaderKey(%q) = %q, want %q", tt.in, s, tt.out) } } } // Issue #34799 add a Header method to get multiple values []string, with canonicalized key
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 17 18:21:01 UTC 2019 - 1.4K bytes - Viewed (0) -
src/net/textproto/reader_test.go
commonHeaderOnce.Do(initCommonHeader) for h := range commonHeader { if h != CanonicalMIMEHeaderKey(h) { t.Errorf("Non-canonical header %q in commonHeader", h) } } b := []byte("content-Length") want := "Content-Length" n := testing.AllocsPerRun(200, func() { if x, _ := canonicalMIMEHeaderKey(b); x != want { t.Fatalf("canonicalMIMEHeaderKey(%q) = %q; want %q", b, x, want) } }) if n > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 05 18:31:56 UTC 2024 - 14.7K bytes - Viewed (0) -
pkg/h2c/wrapper.go
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/net/textproto/reader.go
// returned without modifications. func CanonicalMIMEHeaderKey(s string) string { // Quick check for canonical encoding. upper := true for i := 0; i < len(s); i++ { c := s[i] if !validHeaderFieldByte(c) { return s } if upper && 'a' <= c && c <= 'z' { s, _ = canonicalMIMEHeaderKey([]byte(s)) return s } if !upper && 'A' <= c && c <= 'Z' {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 22.1K bytes - Viewed (0) -
src/net/http/header.go
// canonicalized by [textproto.CanonicalMIMEHeaderKey]. // To use non-canonical keys, assign to the map directly. func (h Header) Set(key, value string) { textproto.MIMEHeader(h).Set(key, value) } // Get gets the first value associated with the given key. If // there are no values associated with the key, Get returns "". // It is case insensitive; [textproto.CanonicalMIMEHeaderKey] is
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 22:14:00 UTC 2024 - 7.6K bytes - Viewed (0) -
src/vendor/golang.org/x/net/http/httpguts/guts.go
"strings" ) // ValidTrailerHeader reports whether name is a valid header field name to appear // in trailers. // See RFC 7230, Section 4.1.2 func ValidTrailerHeader(name string) bool { name = textproto.CanonicalMIMEHeaderKey(name) if strings.HasPrefix(name, "If-") || badTrailer[name] { return false } return true } var badTrailer = map[string]bool{ "Authorization": true, "Cache-Control": true,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 11 20:28:54 UTC 2019 - 1.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/request/websocket/protocol.go
"k8s.io/apimachinery/pkg/util/httpstream/wsstream" "k8s.io/apiserver/pkg/authentication/authenticator" ) const bearerProtocolPrefix = "base64url.bearer.authorization.k8s.io." var protocolHeader = textproto.CanonicalMIMEHeaderKey("Sec-WebSocket-Protocol") var errInvalidToken = errors.New("invalid bearer token") // ProtocolAuthenticator allows a websocket connection to provide a bearer token as a subprotocol
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 07 18:21:43 UTC 2023 - 3.4K bytes - Viewed (0) -
src/net/mail/message.go
if kv == "" { return m, err } // Key ends at first colon. k, v, ok := strings.Cut(kv, ":") if !ok { return m, errors.New("malformed header line: " + kv) } key := textproto.CanonicalMIMEHeaderKey(k) // Permit empty key, because that is what we did in the past. if key == "" { continue } // Skip initial spaces in value. value := strings.TrimLeft(v, " \t")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:31:03 UTC 2024 - 23.5K bytes - Viewed (0) -
internal/bucket/object/lock/lock.go
// users to provide RFC 3339 compliant dates. retDate, err = amztime.ISO8601Parse(dateStr) if err != nil { return rmode, r, ErrInvalidRetentionDate } _, replReq := h[textproto.CanonicalMIMEHeaderKey(xhttp.MinIOSourceReplicationRequest)] t, err := UTCNowNTP() if err != nil { lockLogIf(context.Background(), err) return rmode, r, ErrPastObjectLockRetainDate }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 17.1K bytes - Viewed (0)