cloudflare/quiche · error

Unsupported HTTP version and DATAGRAM protocol.

Error message

Unsupported HTTP version and DATAGRAM protocol.

What it means

This panic fires in quiche-client/quiche-server argument parsing when the HTTP version is 'HTTP/0.9' but a DATAGRAM protocol other than 'none' is requested. DATAGRAM support is only wired up for HTTP/3, so the combination is rejected at startup. It is an intentional configuration guard, not a runtime failure.

Solutions

  1. Use --http-version HTTP/3 when passing a non-'none' --dgram-proto value.
  2. Keep --dgram-proto none if you must use HTTP/0.9.
  3. Check apps/src/args.rs for the exact supported (http_version, dgram_proto) combinations.

Example fix

// before
quiche-client --http-version HTTP/0.9 --dgram-proto oneway https://example.org:4433
// after
quiche-client --http-version HTTP/3 --dgram-proto oneway https://example.org:4433
Defensive patterns

Strategy: validation

Validate before calling

let valid = !matches!(http_version, "HTTP/0.9") || dgram_proto == "none";
if !valid { eprintln!("datagrams require --http-version HTTP/3"); std::process::exit(2); }

Prevention

When it happens

Trigger: Running the app binary with --http-version HTTP/0.9 together with --dgram-proto set to anything other than 'none' (e.g. 'oneway').

Common situations: Users testing QUIC datagrams against legacy HTTP/0.9 endpoints assume both features compose; the CLI only supports datagrams over HTTP/3.

Related errors


AI-assisted analysis of cloudflare/quiche@9f96daa2c2 (2026-09-08). Data as JSON: /api/errors/300f541b48d3a3dd. Report an issue: GitHub.

Appendix: source

Thrown at apps/src/args.rs:97

/// --max-active-cids NUM       Maximum number of active Connection IDs.
/// --enable-active-migration   Enable active connection migration.
/// --max-field-section-size BYTES  Max size of uncompressed field section.
/// --qpack-max-table-capacity BYTES  Max capacity of dynamic QPACK decoding.
/// --qpack-blocked-streams STREAMS  Limit of blocked streams while decoding.
/// --initial-cwnd-packets      Size of initial congestion window, in packets.
///
/// [`Docopt`]: https://docs.rs/docopt/1.1.0/docopt/
impl Args for CommonArgs {
    fn with_docopt(docopt: &docopt::Docopt) -> Self {
        let args = docopt.parse().unwrap_or_else(|e| e.exit());

        let http_version = args.get_str("--http-version");
        let dgram_proto = args.get_str("--dgram-proto");
        let (alpns, dgrams_enabled) = match (http_version, dgram_proto) {
            ("HTTP/0.9", "none") => (alpns::HTTP_09.to_vec(), false),

            ("HTTP/0.9", _) => {
                panic!("Unsupported HTTP version and DATAGRAM protocol.")
            },

            ("HTTP/3", "none") => (alpns::HTTP_3.to_vec(), false),

            ("HTTP/3", "oneway") => (alpns::HTTP_3.to_vec(), true),

            ("all", "none") => (
                [alpns::HTTP_3.as_slice(), &alpns::HTTP_09]
                    .concat()
                    .to_vec(),
                false,
            ),

            (..) => panic!("Unsupported HTTP version and DATAGRAM protocol."),
        };

        let dgram_count = args.get_str("--dgram-count");
        let dgram_count = dgram_count.parse::<u64>().unwrap();

View on GitHub (pinned to 9f96daa2c2)