MCPcopy
hub / github.com/caddyserver/caddy / hasVaryValue

Function hasVaryValue

modules/caddyhttp/encode/encode.go:480–489  ·  view source on GitHub ↗
(hdr http.Header, target string)

Source from the content-addressed store, hash-verified

478}
479
480func hasVaryValue(hdr http.Header, target string) bool {
481 for _, vary := range hdr.Values("Vary") {
482 for val := range strings.SplitSeq(vary, ",") {
483 if strings.EqualFold(strings.TrimSpace(val), target) {
484 return true
485 }
486 }
487 }
488 return false
489}
490
491// AcceptedEncodings returns the list of encodings that the
492// client supports, in descending order of preference.

Callers 2

WriteHeaderMethod · 0.85
initMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected