MCPcopy
hub / github.com/coder/websocket / headerTokens

Function headerTokens

accept.go:357–368  ·  view source on GitHub ↗
(h http.Header, key string)

Source from the content-addressed store, hash-verified

355}
356
357func headerTokens(h http.Header, key string) []string {
358 key = textproto.CanonicalMIMEHeaderKey(key)
359 var tokens []string
360 for _, v := range h[key] {
361 v = strings.TrimSpace(v)
362 for _, t := range strings.Split(v, ",") {
363 t = strings.TrimSpace(t)
364 tokens = append(tokens, t)
365 }
366 }
367 return tokens
368}
369
370var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")
371

Callers 3

selectSubprotocolFunction · 0.85
websocketExtensionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…