{"record":{"id":"3b2fcc68b5fc6d17","repo":"ducaale/xh","slug":"this-binary-was-built-without-support-for-http-3-enable-the","errorCode":null,"errorMessage":"This binary was built without support for HTTP/3. Enable the `http3` feature.","messagePattern":"This binary was built without support for HTTP/3\\. Enable the `http3` feature\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":300,"sourceCode":"            Proxy::All(url) => reqwest::Proxy::all(url),\n        }?);\n    }\n\n    client = match args.http_version {\n        Some(HttpVersion::Http10 | HttpVersion::Http11) => client.http1_only(),\n        Some(HttpVersion::Http2PriorKnowledge) => client.http2_prior_knowledge(),\n        Some(HttpVersion::Http2) => client,\n        Some(HttpVersion::Http3PriorKnowledge) => {\n            #[cfg(feature = \"http3\")]\n            {\n                if args.native_tls {\n                    return Err(anyhow!(\"HTTP/3 is not supported when using native-tls\"));\n                }\n                client.http3_prior_knowledge()\n            }\n            #[cfg(not(feature = \"http3\"))]\n            {\n                return Err(anyhow!(\n                    \"This binary was built without support for HTTP/3. Enable the `http3` feature.\"\n                ));\n            }\n        }\n        None => client,\n    };\n\n    let cookie_jar = Arc::new(reqwest_cookie_store::CookieStoreMutex::default());\n    client = client.cookie_provider(cookie_jar.clone());\n\n    client = match (args.ipv4, args.ipv6) {\n        (true, false) => client.local_address(IpAddr::from(Ipv4Addr::UNSPECIFIED)),\n        (false, true) => client.local_address(IpAddr::from(Ipv6Addr::UNSPECIFIED)),\n        _ => client,\n    };\n\n    if let Some(name_or_ip) = &args.interface {\n        if let Ok(ip_addr) = IpAddr::from_str(name_or_ip) {","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/ducaale/xh/blob/2404aceecc08b0b2d100fedc96f57745cd5904dc/src/main.rs#L282-L318","documentation":"The user requested HTTP/3 prior knowledge but the binary was compiled without the `http3` cargo feature, so the QUIC/HTTP-3 transport code does not exist. The CLI tells the user which feature flag enables it.","triggerScenarios":"run() handles Some(HttpVersion::Http3PriorKnowledge) under #[cfg(not(feature = \"http3\"))].","commonSituations":"Passing --http3 (or setting HTTP version to 3) with a standard release binary built without http3; distro packages that exclude experimental HTTP/3; scripts ported from machines with http3-enabled builds.","solutions":["Remove the --http3 / HTTP/3 version option and use HTTP/2 or default negotiation.","Rebuild with the feature: cargo build --features http3 (requires a nightly-capable quinn stack per docs).","Obtain a binary release built with http3 support.","Verify server actually requires HTTP/3; most servers accept HTTP/2 or /1.1."],"exampleFix":"// before\nxh --http3 GET example.org\n// after\ncargo install xh --features http3\nxh --http3 GET example.org","handlingStrategy":"fallback","validationCode":"// shell guard: only request http3 if the build supports it\nxh --http3 --check-all 2>/dev/null || flags_without_http3","typeGuard":null,"tryCatchPattern":"match run(args) {\n    Err(e) if e.to_string().contains(\"without support for HTTP/3\") => {\n        args.http_version = None; // fall back to negotiated version\n        run(args)\n    }\n    other => other,\n}","preventionTips":["Detect feature support before forcing HTTP/3 in scripts.","Rely on ALPN negotiation instead of prior-knowledge HTTP/3.","Pin builds with --features http3 where HTTP/3 is required.","Keep a fallback HTTP/2 path for minimal binary distributions."],"tags":["http3","cli","feature-flag","build"],"backgroundTag":"feature-not-enabled","analyzedSha":"2404aceecc08b0b2d100fedc96f57745cd5904dc","analyzedAt":"2026-09-13T19:13:33.814Z","contentChangedAt":"2026-09-13T19:13:33.814Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}