hyperium / hyperium/h3

h3 quinn example doesn't seem well behaved when tested with curl

Open
#321 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
890
Forks
136
Avg merge
14d 20h
Merged PRs (30d)
2

Description

Here's the example, including example certs and example webroot: https://github.com/paulcdejean/quinn-h3-example

It's from the server.rs here: https://github.com/hyperium/h3/tree/master/examples

With very small tweaks to make error reporting better (basically just changing the function signature of main to async fn main() -> Result<(), anyhow::Error> )

I'm able to run the example successfully with:
RUST_BACKTRACE=1 cargo run -- --dir webroot

Then I submit a curl request and this happens:

~ $ /opt/homebrew/opt/curl/bin/curl --http3-only -k https://localhost:4433/index.html
Hello world!
curl: (18) HTTP/3 stream 0 reset by server

You can see the "Hello world!" contents of the index.html file in the webroot, is in fact returned. So this shows that things are mostly workingish.

In the logs for the server I get:

$ RUST_BACKTRACE=1 cargo run -- --dir webroot                            
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/h3-example --dir webroot`
2025-10-07T22:22:00.850834Z  INFO h3_example: serving webroot
2025-10-07T22:22:00.853676Z  INFO h3_example: listening on [::1]:4433
2025-10-07T22:22:04.314797Z  INFO h3_example: new connection established
2025-10-07T22:22:04.315908Z  INFO h3_example: successfully respond to connection
2025-10-07T22:22:04.316338Z ERROR h3_example: error on accept Remote error: Error undefined by h3: aborted by peer: the connection is being closed abruptly in the absence of any error

Curl version:

curl 8.16.0 (aarch64-apple-darwin24.4.0) libcurl/8.16.0 OpenSSL/3.6.0 zlib/1.2.12 brotli/1.1.0 zstd/1.5.7 AppleIDN libssh2/1.11.1 nghttp2/1.67.1 ngtcp2/1.16.0 nghttp3/1.12.0 librtmp/2.3
Release-Date: 2025-09-10
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Operating system is MacOS 15.6.1 and cpu arch is apple silicon.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the h3 example from examples/server.rs with RUST_BACKTRACE=1 cargo run -- --dir webroot, then reproduce the request with curl 8.16.0 using --http3-only -k. Investigate why the response body is returned but curl reports stream 0 reset and the server logs an aborted connection. Done means the example serves index.html without curl error or an unexplained accept error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.