Skip to content

Introduce HTTP/3 configuration#98

Merged
FranzBusch merged 9 commits into
swift-server:mainfrom
aryan-25:introduce-http3-configuration
Jul 20, 2026
Merged

Introduce HTTP/3 configuration#98
FranzBusch merged 9 commits into
swift-server:mainfrom
aryan-25:introduce-http3-configuration

Conversation

@aryan-25

Copy link
Copy Markdown
Collaborator

Motivation:

swift-nio-quic and swift-nio-http3 have recently been announced, paving the way for HTTP/3 support in NIOHTTPServer.

This PR introduces HTTP/3 configuration types as a first step towards HTTP/3 support.

Modifications:

  • Introduced a new HTTP3 type under NIOHTTPServerConfiguration containing three sub-components, namely QUICConfiguration, ProtocolConfiguration, and ConnectionSettings. These types wrap over the corresponding NIOQUIC and NIOHTTP3 types.

  • Added swift-nio-quic, swift-nio-quic-helpers, and swift-nio-http3 dependencies.

Result:

HTTP/3 configuration types are now defined.

@aryan-25
aryan-25 requested review from FranzBusch and gjcairo July 14, 2026 18:02
@aryan-25 aryan-25 added the 🆕 semver/minor Adds new public API. label Jul 14, 2026
Comment thread .github/workflows/apibreakage.yml Outdated
Comment thread Sources/NIOHTTPServer/Configuration/HTTP3/HTTP3+ConnectionSettings.swift Outdated

@FranzBusch FranzBusch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add support for swift-configuration for all those new options

Comment thread .github/workflows/apibreakage.yml Outdated
Comment thread Sources/NIOHTTPServer/Configuration/HTTP3/NIOHTTPServerConfiguration+HTTP3.swift Outdated
@aryan-25

Copy link
Copy Markdown
Collaborator Author

I was planning to add swift-configuration integration in a follow-up PR in order to keep the diff minimal in this PR.

@aryan-25
aryan-25 requested review from FranzBusch and gjcairo July 16, 2026 15:03

@FranzBusch FranzBusch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the public API now looks good. Can we introduce all of this behind a new HTTP3 trait that is off by default. This is mostly since the other libraries are not yet stable and will allow us to break more easily.

@aryan-25
aryan-25 requested a review from FranzBusch July 20, 2026 13:00
@aryan-25
aryan-25 enabled auto-merge (squash) July 20, 2026 13:04
@aryan-25
aryan-25 removed the request for review from gjcairo July 20, 2026 13:45
@FranzBusch
FranzBusch requested a review from gjcairo July 20, 2026 13:52
@FranzBusch
FranzBusch disabled auto-merge July 20, 2026 13:52
@FranzBusch
FranzBusch removed the request for review from gjcairo July 20, 2026 13:52
@FranzBusch
FranzBusch merged commit d889186 into swift-server:main Jul 20, 2026
17 of 22 checks passed
@aryan-25
aryan-25 deleted the introduce-http3-configuration branch July 20, 2026 13:53
aryan-25 added a commit that referenced this pull request Jul 21, 2026
### Motivation

In #98, configuration APIs for HTTP/3 were added to
`NIOHTTPServerConfiguration`. This PR introduces support for specifying
HTTP/3 configuration options using `swift-configuration`.

### Modifications

- Added APIs for parsing HTTP/3 configuration from a
`swift-configuration` `ConfigReader`.
- Updated documentation and added associated tests.
- Some general refactoring e.g. removing unused types.

### Result

HTTP/3 configuration can now be specified using `swift-configuration`.
FranzBusch pushed a commit that referenced this pull request Jul 22, 2026
### Motivation

Following from #98, this PR introduces support for serving HTTP/3.

### Modifications

- Added `NIOHTTPServer+HTTP3.swift` which contains helper methods for
setting up a QUIC channel, adding HTTP/3 handlers, and serving HTTP/3
connections.
- Wired HTTP/3 into `makeServerChannels()`.
- When HTTP/3 is the only version specified in `supportedHTTPVersions`,
only a QUIC channel is bound to the specified port. When
`supportedHTTPVersions` includes HTTP/1.1 and/or HTTP/2 alongside
HTTP/3, the QUIC UDP channel is bound on the same port as the TCP
channel serving HTTP/1.1 and/or HTTP/2.
  - Note: I will introduce Alt-Svc advertising in a subsequent PR.

### Result

`NIOHTTPServer` can now serve HTTP/3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants