{"record":{"id":"4d5f7ca28f8ae16f","repo":"cloudflare/cloudflared","slug":"cloudflared-received-a-warp-routing-request-with-a","errorCode":null,"errorMessage":"cloudflared received a warp-routing request with an empty host value: %w","messagePattern":"cloudflared received a warp-routing request with an empty host value: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"connection/http2.go","lineNumber":140,"sourceCode":"\t\tif requestErr != nil {\n\t\t\tc.controlStreamErr = requestErr\n\t\t}\n\n\tcase TypeConfiguration:\n\t\trequestErr = c.handleConfigurationUpdate(respWriter, r)\n\n\tcase TypeWebsocket, TypeHTTP:\n\t\tstripWebsocketUpgradeHeader(r)\n\t\t// Check for tracing on request\n\t\ttr := tracing.NewTracedHTTPRequest(r, c.connIndex, c.log)\n\t\tif err := originProxy.ProxyHTTP(respWriter, tr, connType == TypeWebsocket); err != nil {\n\t\t\trequestErr = fmt.Errorf(\"Failed to proxy HTTP: %w\", err)\n\t\t}\n\n\tcase TypeTCP:\n\t\thost, err := getRequestHost(r)\n\t\tif err != nil {\n\t\t\trequestErr = fmt.Errorf(`cloudflared received a warp-routing request with an empty host value: %w`, err)\n\t\t\tbreak\n\t\t}\n\n\t\trws := NewHTTPResponseReadWriterAcker(respWriter, respWriter, r)\n\t\trequestErr = originProxy.ProxyTCP(r.Context(), rws, &TCPRequest{\n\t\t\tDest:      host,\n\t\t\tCFRay:     FindCfRayHeader(r),\n\t\t\tLBProbe:   IsLBProbeRequest(r),\n\t\t\tCfTraceID: r.Header.Get(tracing.TracerContextName),\n\t\t\tConnIndex: c.connIndex,\n\t\t})\n\n\tdefault:\n\t\trequestErr = fmt.Errorf(\"Received unknown connection type: %s\", connType)\n\t}\n\n\tif requestErr != nil {\n\t\tc.log.Error().Err(requestErr).Msg(\"failed to serve incoming request\")","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/connection/http2.go#L122-L158","documentation":"When an incoming request on the HTTP/2 connection has type TypeTCP (warp-routing), ServeHTTP extracts the request host via getRequestHost. If the Host header is empty or unparseable, it wraps the error as `cloudflared received a warp-routing request with an empty host value`. Warp-routing needs the host to know the TCP destination, so a request without one cannot be routed.","triggerScenarios":"A warp-routing request arrives with connection type TypeTCP and getRequestHost returns an error because the request's Host header is empty or invalid, before ProxyTCP is invoked.","commonSituations":"WARP client routing traffic where the SNI/Host header is stripped or empty, misconfigured warp routing on the Cloudflare side, or a client sending raw TCP requests through the tunnel without a valid host.","solutions":["Ensure the WARP client / originating request includes a valid Host header","Verify warp-routing is enabled for the tunnel (`cloudflared tunnel route ip add ...`) and traffic reaches it as intended","Check client-side proxy configuration so it does not strip the Host header","Update cloudflared and the WARP client to current versions"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if r.Host == \"\" { // caller-side guard before routing warp traffic\n    return errors.New(\"warp-routing request requires a Host header\")\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"empty host value\") {\n    log.Warn().Err(err).Msg(\"dropping warp request without host header\")\n    return\n}","preventionTips":["Ensure WARP client traffic always carries a Host header","Enable warp-routing only for tunnels whose clients set proper headers","Keep WARP client and cloudflared versions current"],"tags":["warp-routing","tcp","host-header"],"backgroundTag":"missing-required-argument","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}