{"record":{"id":"a4efa91633680372","repo":"caddyserver/caddy","slug":"provisioning-transport-header-ops-v","errorCode":null,"errorMessage":"provisioning transport header ops: %v","messagePattern":"provisioning transport header ops: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/caddyhttp/reverseproxy/reverseproxy.go","lineNumber":371,"sourceCode":"\n\t// set up transport\n\tif h.Transport == nil {\n\t\tt := &HTTPTransport{}\n\t\terr := t.Provision(ctx)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"provisioning default transport: %v\", err)\n\t\t}\n\t\th.Transport = t\n\t}\n\n\t// If the transport can provide header ops, cache them now so we don't\n\t// have to compute them per-request. Provision the HeaderOps if present\n\t// so any runtime artifacts (like precompiled regex) are prepared.\n\tif tph, ok := h.Transport.(RequestHeaderOpsTransport); ok {\n\t\th.transportHeaderOps = tph.RequestHeaderOps()\n\t\tif h.transportHeaderOps != nil {\n\t\t\tif err := h.transportHeaderOps.Provision(ctx); err != nil {\n\t\t\t\treturn fmt.Errorf(\"provisioning transport header ops: %v\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\t// set up load balancing\n\tif h.LoadBalancing == nil {\n\t\th.LoadBalancing = new(LoadBalancing)\n\t}\n\tif h.LoadBalancing.SelectionPolicy == nil {\n\t\th.LoadBalancing.SelectionPolicy = RandomSelection{}\n\t}\n\tif h.LoadBalancing.TryDuration > 0 && h.LoadBalancing.TryInterval == 0 {\n\t\t// a non-zero try_duration with a zero try_interval\n\t\t// will always spin the CPU for try_duration if the\n\t\t// upstream is local or low-latency; avoid that by\n\t\t// defaulting to a sane wait period between attempts\n\t\th.LoadBalancing.TryInterval = caddy.Duration(250 * time.Millisecond)\n\t}","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/caddyserver/caddy/blob/50e54ee279aa1e504fe218ca49ab6ae16c100410/modules/caddyhttp/reverseproxy/reverseproxy.go#L353-L389","documentation":"Error \"provisioning transport header ops: %v\" thrown in caddyserver/caddy.","triggerScenarios":"Thrown at modules/caddyhttp/reverseproxy/reverseproxy.go:371 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the transport header operations configuration; the wrapped error identifies the invalid header operation."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"50e54ee279aa1e504fe218ca49ab6ae16c100410","analyzedAt":"2026-08-15T09:20:21.641Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}