Skip to content

Align HTTP/3 with current aioquic releases - #399

Open
jlaine wants to merge 3 commits into
pgjones:mainfrom
jlaine:align-http3-with-aioquic
Open

jlaine wants to merge 3 commits into
pgjones:mainfrom
jlaine:align-http3-with-aioquic

Conversation

@jlaine

@jlaine jlaine commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

aioquic 1.8.0 removed HTTP/3 server push. Hypercorn still offered the http.response.push extension on HTTP/3 and called the send_push_promise() stub, which aioquic only keeps for compatibility.

  • Remove HTTP/3 server push. HTTP/2 push is unchanged.
  • Stop relying on aioquic compatibility aliases and defaults: use QuicPacketType (requires aioquic >= 1.2.0), and take the connection ID length from the QUIC configuration.
  • Don't answer a Version Negotiation packet with another one, as aioquic's own server does.

The tests now run with the h3 extra, so the new QUIC tests can run in CI.

aioquic 1.8.0 removed HTTP/3 server push: send_push_promise() now always
raises NoAvailablePushIDError, and both are only kept as deprecated stubs
that will go away. Applications were still offered the http.response.push
extension on HTTP/3, although no push could ever be sent.

Stop offering the extension on HTTP/3 and drop the push code from the
HTTP/3 protocol. HTTP/2 push is unchanged.
QUIC header parsing relied on two things aioquic doesn't promise to keep:

- PACKET_TYPE_INITIAL, which aioquic only keeps as a backwards compatible
  alias of QuicPacketType.INITIAL since 1.2.0. Compare against the enum
  instead, and require aioquic 1.2.0, the first release to have it.
- A hard-coded connection ID length of 8 for short header packets, which
  only matched aioquic's default. Use the length from the QUIC
  configuration instead.

Also require aioquic below 2.0, as aioquic makes no stability guarantee
past 1.x. The tests now run with the h3 extra installed, so the new QUIC
tests can use aioquic.
A Version Negotiation packet has version 0, which is never in the
supported versions, so hypercorn answered it with a Version Negotiation
packet of its own. Two servers that receive each other's Version
Negotiation packets would keep answering each other indefinitely.

Skip Version Negotiation packets when checking the version, as aioquic's
own server does.
@jlaine

jlaine commented Nov 22, 2026

Copy link
Copy Markdown
Contributor Author

@pgjones the CI failures seem unrelated to my changes

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant