Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for canonicalMIMEHeaderKey (0.54 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
Back to top