caddyserver/caddy · error

provisioning transport header ops: %v

Error message

provisioning transport header ops: %v

What it means

Error "provisioning transport header ops: %v" thrown in caddyserver/caddy.

Source

Thrown at modules/caddyhttp/reverseproxy/reverseproxy.go:371

	// set up transport
	if h.Transport == nil {
		t := &HTTPTransport{}
		err := t.Provision(ctx)
		if err != nil {
			return fmt.Errorf("provisioning default transport: %v", err)
		}
		h.Transport = t
	}

	// If the transport can provide header ops, cache them now so we don't
	// have to compute them per-request. Provision the HeaderOps if present
	// so any runtime artifacts (like precompiled regex) are prepared.
	if tph, ok := h.Transport.(RequestHeaderOpsTransport); ok {
		h.transportHeaderOps = tph.RequestHeaderOps()
		if h.transportHeaderOps != nil {
			if err := h.transportHeaderOps.Provision(ctx); err != nil {
				return fmt.Errorf("provisioning transport header ops: %v", err)
			}
		}
	}

	// set up load balancing
	if h.LoadBalancing == nil {
		h.LoadBalancing = new(LoadBalancing)
	}
	if h.LoadBalancing.SelectionPolicy == nil {
		h.LoadBalancing.SelectionPolicy = RandomSelection{}
	}
	if h.LoadBalancing.TryDuration > 0 && h.LoadBalancing.TryInterval == 0 {
		// a non-zero try_duration with a zero try_interval
		// will always spin the CPU for try_duration if the
		// upstream is local or low-latency; avoid that by
		// defaulting to a sane wait period between attempts
		h.LoadBalancing.TryInterval = caddy.Duration(250 * time.Millisecond)
	}

View on GitHub (pinned to 50e54ee279)

Solutions

  1. Fix the transport header operations configuration; the wrapped error identifies the invalid header operation.

When it happens

Trigger: Thrown at modules/caddyhttp/reverseproxy/reverseproxy.go:371 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of caddyserver/caddy@50e54ee279 (2026-08-15). Data as JSON: /api/errors/a4efa91633680372. Report an issue: GitHub.