httpheader

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package httpheader owns shared HTTP field grammar and static header ownership.

Index

Constants

View Source
const (
	IdempotencyKey = "Idempotency-Key"
	RequestID      = "X-Request-ID"
	TraceParent    = "traceparent"
	TraceState     = "tracestate"
)
View Source
const MaxNameBytes = 256
View Source
const MaxValueBytes = 8192

Variables

This section is empty.

Functions

func CanonicalName

func CanonicalName(name string) (string, error)

CanonicalName validates before applying Go's conventional header casing.

func ReservedApplicationName

func ReservedApplicationName(name string) bool

ReservedApplicationName identifies the existing proxy/security X-* ownership shared by request declarations and application response headers.

func ReservedRequestName

func ReservedRequestName(name string) bool

ReservedRequestName matches static framework/transport ownership regardless of casing. Configured proxy headers and third-party middleware inputs must also not be declared, but are not inferred by this static policy.

func ValidateName

func ValidateName(name string) error

ValidateName checks the bounded ASCII HTTP field-name grammar.

func ValidateRequestName

func ValidateRequestName(name string) error

ValidateRequestName rejects invalid names and static reserved request inputs.

func ValidateRequestValue

func ValidateRequestValue(value string) error

ValidateRequestValue restricts typed request values to portable ASCII and HTAB. Framing owns outer whitespace normalization; scalar codecs own field grammar.

func ValidateValue

func ValidateValue(value string) error

ValidateValue preserves native header values, rejecting controls except HTAB.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL