Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-05-20 | 9.8 kB | |
v0.52.0 source code.tar.gz | 2025-05-20 | 629.0 kB | |
v0.52.0 source code.zip | 2025-05-20 | 866.1 kB | |
Totals: 3 Items | 1.5 MB | 3 |
This release focus on HTTP/3 graceful shutdown using the GOAWAY mechnism.
On the server side graceful shutdown is initiated by calling the http3.Server.Shutdown
method:
- A single GOAWAY frame is sent, instructing the client to not issue any new requests (#5114).
- New requests are rejected by resetting the streams using the H3_REQUEST_REJECTED reset error code: [#5116].
- QUIC listeners created by the HTTP/3 server (i.e. when using
http3.Server.ListenAndServe
andListenAndServeTLS
) are immediately closed (#5101). QUIC listeners created by the application (i.e. when usinghttp3.Server.ServeListener
) are left running, it is the application's responsibility to close them, or use them in a new server instance (#5129). - Note that the during the graceful shutdown period, the server does not close existing connections, as this is racy in the presence of packet reordering.
On the client side, when receiving a GOAWAY frame:
- No new streams will be opened on the new connection. Requests to the same origin will be sent on a freshly established QUIC connection.
- Once all requests have completed / were cancelled, the underlying QUIC connection is closed: [#5143] and [#5145].
Breaking Changes
Transport.ConnContext
now passes theClientInfo
to the callback, and allows rejecting handshakes by introducing anerror
return value: [#5122]. This allows applications to build more sophisticated DoS defenses. Thanks to @sukunrt!- Connections accepted from a
Listener
using theListen
andListenAddr
convenience functions now aren't closed when the listener is closed. This makes the shutdown behavior consistent with listeners created from aTransport
, and the standard library'snet.Listener
: [#5108].
Other Notable Changes
- The TLS ClientHello is now fragmented into multiple pieces, complicating Deep Packet Inspection of the handshake by middlebox: [#5107]. This behavior can be disabled by setting the
QUIC_GO_DISABLE_CLIENTHELLO_SCRAMBLING
environment variable. - Kernel control messages for ECN and for picking the correct network interface now work on big-endian platforms such as s390x: [#5094] and [#5105]. Thanks to @Zxilly!
- The RTT estimate is now stored in the resumption token (and not in the TLS session ticket): [#5065]. Thanks to @tanghaowillow!
Fixes
- http3: The Alt-Svc entry is now removed when
http3.Server.Serve
returns: [#5093]. - http3:
http3.Server.ServeQUICConn
now returnshttp.ErrServerClosed
when called on a closed server: [#5095]. - http3: The datagram receive loop now doesn't prematurely return when receiving a datagram for an unknown stream: [#5136].
- http3: Requests are now only retried when it can be guaranteed that the server didn't process the request: [#5141].
- http3: Prevent a stream leak when the server sends too many 1xx responses: [#5144].
Behind The Scenes
As in the last couple of releases, we continued our ongoing effort to migrate away from the Ginkgo test suite (tracking issue #3652), mostly in the HTTP/3 package: [#5068], [#5069], [#5070], [#5073], [#5075], [#5078], [#5067], [#5081], [#5085], [#5096], [#5133]. There are still ~1400 LOC of Ginkgo tests to clean up, scattered across the code base.
Changelog
- use assert.AnError consistently in tests by @marten-seemann in https://github.com/quic-go/quic-go/pull/5066
- http3: migrate the request writer tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5069
- http3: migrate the headers tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5068
- http3: simplify request writer by writing to an io.Writer by @marten-seemann in https://github.com/quic-go/quic-go/pull/5070
- http3: check response writer for http.ResponseController methods by @marten-seemann in https://github.com/quic-go/quic-go/pull/5071
- http3: migrate the capsule tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5073
- http3: migrate the response writer tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5075
- http3: migrate the datagram tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5076
- http3: migrate the body tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5078
- http3: migrate the frames tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5067
- ackhandler: migrate the packet number generator tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5081
- http3: use httptest.NewRequest by @marten-seemann in https://github.com/quic-go/quic-go/pull/5086
- http3: update
Hijacker
andHTTPStreamer
documentation by @TheoTechnicguy in https://github.com/quic-go/quic-go/pull/5089 - http3: use a slice instead of a map to store active listeners by @marten-seemann in https://github.com/quic-go/quic-go/pull/5087
- http3: remove Alt-Svc entry when Server.Serve returns by @marten-seemann in https://github.com/quic-go/quic-go/pull/5093
- http3: return http.ErrServerClosed for ServeQUICConn after Server.Close by @marten-seemann in https://github.com/quic-go/quic-go/pull/5095
- fix: parse ifindex from packet correctly by @Zxilly in https://github.com/quic-go/quic-go/pull/5094
- http3: migrate the server tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5085
- fix dequeuing logic for tiny CRYPTO frames by @marten-seemann in https://github.com/quic-go/quic-go/pull/5104
- remove periodic logging functionality from packet handler map by @marten-seemann in https://github.com/quic-go/quic-go/pull/5110
- delete retired connection IDs after 3 PTOs by @marten-seemann in https://github.com/quic-go/quic-go/pull/5109
- simplify tracking of Transports for connection migration by @marten-seemann in https://github.com/quic-go/quic-go/pull/5111
- ci: set a 30 minute timeout for the interop Docker job by @marten-seemann in https://github.com/quic-go/quic-go/pull/5112
- http3: send GOAWAY frame in a new Goroutine by @marten-seemann in https://github.com/quic-go/quic-go/pull/5114
- ci: also build the interop image on pull requests, but skip pushing by @marten-seemann in https://github.com/quic-go/quic-go/pull/5115
- delete closed connections after 3 PTOs by @marten-seemann in https://github.com/quic-go/quic-go/pull/5117
- http3: reset request streams accepted after graceful shutdown by @marten-seemann in https://github.com/quic-go/quic-go/pull/5116
- ci: bump golangci-lint-action to v8 and golangci-lint to v2.1.6 by @dependabot in https://github.com/quic-go/quic-go/pull/5118
- move connection tracking into the Transport by @marten-seemann in https://github.com/quic-go/quic-go/pull/5113
- ci: remove stray GITREF env from Docker interop workflow by @marten-seemann in https://github.com/quic-go/quic-go/pull/5119
- split SNI and ECH extensions in the ClientHello by @marten-seemann in https://github.com/quic-go/quic-go/pull/5107
- ci: only apply the interop Docker build concurrency group for pushes by @marten-seemann in https://github.com/quic-go/quic-go/pull/5120
- fix ECN control messages on big-endian architectures by @Zxilly in https://github.com/quic-go/quic-go/pull/5105
- remove stray assertion that handshakes are running from tests by @marten-seemann in https://github.com/quic-go/quic-go/pull/5123
- fix race condition in tests when setting the key update interval by @marten-seemann in https://github.com/quic-go/quic-go/pull/5121
- remove the changelog by @marten-seemann in https://github.com/quic-go/quic-go/pull/5074
- never close accepted connections when the listener is closed by @marten-seemann in https://github.com/quic-go/quic-go/pull/5108
- http3: don't close QUIC listeners created by the application by @marten-seemann in https://github.com/quic-go/quic-go/pull/5129
- http3: close QUIC listeners created by Server on graceful shutdown by @marten-seemann in https://github.com/quic-go/quic-go/pull/5101
- use the slices package to simply QUIC version comparisons by @marten-seemann in https://github.com/quic-go/quic-go/pull/5130
- http3: migrate the client tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5096
- http3: keep datagram receive loop running on datagram for unknown stream by @marten-seemann in https://github.com/quic-go/quic-go/pull/5136
- http3: migrate the connection tests away from Ginkgo by @marten-seemann in https://github.com/quic-go/quic-go/pull/5133
- http3: fix flaky TestClientRequestLengthLimit by @marten-seemann in https://github.com/quic-go/quic-go/pull/5137
- fix flaky TestHandshakeCloseListener by @marten-seemann in https://github.com/quic-go/quic-go/pull/5140
- http3: only retry requests for which it is safe to do so by @marten-seemann in https://github.com/quic-go/quic-go/pull/5141
- pass ClientInfo to ConnContext, allow rejecting of handshakes by @sukunrt in https://github.com/quic-go/quic-go/pull/5122
- store the RTT in the token, not in the session ticket by @tanghaowillow in https://github.com/quic-go/quic-go/pull/5065
- http3: reset request stream if the server sends too many 1xx responses by @marten-seemann in https://github.com/quic-go/quic-go/pull/5144
- http3: implement client-side GOAWAY handling by @marten-seemann in https://github.com/quic-go/quic-go/pull/5143
- http3: fix off-by-one error when processing the GOAWAY stream ID by @marten-seemann in https://github.com/quic-go/quic-go/pull/5145
New Contributors
- @TheoTechnicguy made their first contribution in https://github.com/quic-go/quic-go/pull/5089
Full Changelog: https://github.com/quic-go/quic-go/compare/v0.51.0...v0.52.0