The http3.Server now supports graceful shutdown: calling Shutdown stops the server from accepting new connections, and new HTTP requests on existing connections. It continues serving existing connections until all active requests have completed (or the context is canceled).
On the wire, graceful shutdown is signaled by sending a GOAWAY frame. This tells the client that the server will not accept any new requests. Clients are expected to finish existing requests and then close the QUIC connection.
Client-side support for graceful shutdown is not implemented yet (see #153).
Breaking Changes
The HTTP/3 client API was made more consistent with the Go standard library's HTTP/1 and HTTP/2 naming: #4693
The deprecated qlog.DefaultTracer function was removed: #4697
The deprecated http3.Server.SetQuicHeader method and http3.ListenAndServe were removed: #4698
http3.Server.Close now closes immediately all QUIC connections: #4689
Note that all connection passed to http3.Server.ServeQUICConn need to be closed by the caller, before calling http3.Server.Close.
Notable Fixes
Canceling a stream after connection termination now doesn't change the error returned from Stream.Write and Stream.Read (thanks to @sukunrt for the fix): #4673
HTTP/3 Capsule Parsing logic didn't work for capsules that weren't read with a single Read call: #4683
Behind The Scenes
We've started migrating our test suite away from Ginkgo (tracking issue: #3652), and towards a more idiomatic approach to testing Go code (using require). This is a massive endevour, as our test suite is around 47k LOC.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps github.com/quic-go/quic-go from 0.45.1 to 0.48.1.
Release notes
Sourced from github.com/quic-go/quic-go's releases.
... (truncated)
Commits
98de6ae
http3: fix graceful server shutdown (#4707)6af2b1a
http3: rename Server.CloseGracefully to Shutdown (#4701)4a9a81c
http3: output panic stack trace as a string (#4700)588b93c
http3: add (deprecated) type aliases for RoundTripper and SingleDestinationRo...2dc1e35
http3: remove deprecated ListenAndServe and Server.SetQuicHeader (#4698)d5d7592
qlog: remove deprecated DefaultTracer function (#4697)29f903f
http3: improve documentation for Transport and ClientConn (#4696)0a6e362
http3: don't expose ClientConn.HandleUnidirectionalStreams (#4695)b4ae847
http3: export the Capsule-Protocol header value (#4690)1db805c
http3: improve the client API (#4693)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show