ducaale/xh · error
This binary was built without support for HTTP/3. Enable…
Error message
This binary was built without support for HTTP/3. Enable the `http3` feature.
What it means
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.
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.
Example fix
// before xh --http3 GET example.org // after cargo install xh --features http3 xh --http3 GET example.org
Defensive patterns
Strategy: fallback
Validate before calling
// shell guard: only request http3 if the build supports it xh --http3 --check-all 2>/dev/null || flags_without_http3
Try / catch
match run(args) {
Err(e) if e.to_string().contains("without support for HTTP/3") => {
args.http_version = None; // fall back to negotiated version
run(args)
}
other => other,
} Prevention
- 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.
When it happens
Trigger: run() handles Some(HttpVersion::Http3PriorKnowledge) under #[cfg(not(feature = "http3"))].
Common situations: 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.
Related errors
- This binary was built without native-tls support
- HTTP/3 is not supported when using native-tls
- message-signature: RSA private keys require an explicit…
- Unsupported option
- Unknown option
AI-assisted analysis of ducaale/xh@2404aceecc (2026-09-13).
Data as JSON: /api/errors/3b2fcc68b5fc6d17.
Report an issue: GitHub.
Appendix: source
Thrown at src/main.rs:300
Proxy::All(url) => reqwest::Proxy::all(url),
}?);
}
client = match args.http_version {
Some(HttpVersion::Http10 | HttpVersion::Http11) => client.http1_only(),
Some(HttpVersion::Http2PriorKnowledge) => client.http2_prior_knowledge(),
Some(HttpVersion::Http2) => client,
Some(HttpVersion::Http3PriorKnowledge) => {
#[cfg(feature = "http3")]
{
if args.native_tls {
return Err(anyhow!("HTTP/3 is not supported when using native-tls"));
}
client.http3_prior_knowledge()
}
#[cfg(not(feature = "http3"))]
{
return Err(anyhow!(
"This binary was built without support for HTTP/3. Enable the `http3` feature."
));
}
}
None => client,
};
let cookie_jar = Arc::new(reqwest_cookie_store::CookieStoreMutex::default());
client = client.cookie_provider(cookie_jar.clone());
client = match (args.ipv4, args.ipv6) {
(true, false) => client.local_address(IpAddr::from(Ipv4Addr::UNSPECIFIED)),
(false, true) => client.local_address(IpAddr::from(Ipv6Addr::UNSPECIFIED)),
_ => client,
};
if let Some(name_or_ip) = &args.interface {
if let Ok(ip_addr) = IpAddr::from_str(name_or_ip) {View on GitHub (pinned to 2404aceecc)