Home / Function/ headerContainsValue() — fiber Function Reference

headerContainsValue() — fiber Function Reference

Architecture documentation for the headerContainsValue() function in res.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  e7fd20ef_241e_cc6c_d899_0ef6bbc1699c["headerContainsValue()"]
  4ab93de8_955a_4087_8264_32cf8000452f["res.go"]
  e7fd20ef_241e_cc6c_d899_0ef6bbc1699c -->|defined in| 4ab93de8_955a_4087_8264_32cf8000452f
  style e7fd20ef_241e_cc6c_d899_0ef6bbc1699c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

res.go lines 161–180

func headerContainsValue(header, value string) bool {
	// Empty value should never match
	if value == "" {
		return false
	}

	// Exact match (single value header)
	if header == value {
		return true
	}

	// Check each comma-separated element, handling optional whitespace (OWS)
	for part := range strings.SplitSeq(header, ",") {
		if utils.TrimSpace(part) == value {
			return true
		}
	}

	return false
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does headerContainsValue() do?
headerContainsValue() is a function in the fiber codebase, defined in res.go.
Where is headerContainsValue() defined?
headerContainsValue() is defined in res.go at line 161.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free