v0.43.0
quic-go.net: Launching a new Documentation Site
With this release, we're launching a new documentation site for the quic-go projects (quic-go itself, HTTP/3, webtransport-go, and soon, masque-go): quic-go.net.
The documentation site aims to explain QUIC concepts and how they are made accessible using quic-go's API. This site replaces the wiki, and the ever-growing README files.
A lot of work has gone into the documentation already, but we're by no means done yet. The entire source is public in https://github.com/quic-go/docs/, and we're happy about community contributions.
HTTP Datagrams (RFC 9297)
This release adds support for HTTP Datagrams (RFC 9297), both on the client and on the server side (#4452). HTTP Datagrams are used in WebTransport in CONNECT-UDP (RFC 9298), among others.
The new API for HTTP Datagrams is described on the new documentation page: HTTP Datagrams. The integration of HTTP Datagram support necessitated a comprehensive refactor of the HTTP/3 package, resulting in several breaking API changes listed below.
Breaking Changes
- quicvarint: functions now return an
int
instead the internalprotocol.ByteCount
(#4365) - http3:
Server.SetQuicHeaders
was renamed toSetQUICHeaders
(#4377) - http3:
Server.QuicConfig
was renamed toQUICConfig
(#4384) - http3:
RoundTripper.QuicConfig
was renamed toQUICConfig
(#4385) - http3:
RoundTripOpt.CheckSettings
was removed (#4416). Use the newSingleDestinationRoundTripper
API instead. - http3: the
HTTPStreamer
interface is now implemented by thehttp.ResponseWriter
(and not thehttp.Request.Body
) (#4469) - include the maximum payload size in the
DatagramTooLargeError
(#4470)
Other Notable Changes
- GSO and ECN is disabled on kernel versions older than 5 (#4456)
- http3: logging can be controlled using an
slog.Logger
(#4449) - http3: HEAD requests can now be sent in 0-RTT (#4378)
- http3: duplicate QPACK encoder and decoder streams are not rejected as required by the RFC (#4388)
- http3: Extended CONNECT are blocked until the server's SETTINGS are received, as required by the RFC (#4450)
- http3: HTTP/3 client connections aren't removed if
RoundTrip
errors due to a cancelled context (#4448). Thanks to @GeorgeMac! - http3: sniff Content-Type when flushing the ResponseWriter (#4412). Thanks to @WeidiDeng!
- The
Context
exposed on thequic.Stream
is now derived from the connection's context (#4414) - The UDP send and receive buffer size was increased to 7 MiB (#4455). Thanks to @bt90!
Clarifications on the QUIC Stream State Machine
Calling CancelWrite after Close
After a long and fruitful discussion (#4404), we decided to clarify that calling CancelWrite
after Close
on a SendStream
(or a bidirectional stream) should cause a state transition from the "Data Sent" to the "Reset Sent" state, as described in section 3.1 of RFC 9000. This matches the current behavior of quic-go, however, it didn't match the API documentation (fixed in #4419).
This means that stream data will not be delivered reliably if CancelWrite
is called, and that this applies even if Close
was called before.
Garbage Collection of Streams
This release also changes the way streams are garbage-collected (and the peer is granted additional limit to open a new stream), once they're not needed anymore, in a subtle way:
Thanks to @sukunrt for extremely thorough and helpful reviews on both these PRs!
quic-go needs your support!
Is your project / company relying on quic-go?
Please consider funding the project. Any support is highly appreciated!
Changelog
- quicvarint: use int instead of internal protocol.ByteCount type by @marten-seemann in #4356
- http3: improve documentation for Server.SetQuicHeaders by @marten-seemann in #4376
- http3: make it possible to send HEAD requests in 0-RTT by @marten-seemann in #4378
- http3: don't modify any fields of the http.Request when doing 0-RTT by @marten-seemann in #4379
- http3: rename Server.SetQuicHeaders to Server.SetQUICHeaders by @marten-seemann in #4377
- add an integration test for 0-RTT GET requests by @marten-seemann in #4386
- http3: rename Server.QuicConfig to Server.QUICConfig by @marten-seemann in #4384
- http3: rename RoundTripper.QuicConfig to RoundTripper.QUICConfig by @marten-seemann in #4385
- http3: refactor the client's and server's unidirectional stream handling by @marten-seemann in #4387
- http3: reject duplicate QPACK decoder and encoder streams by @marten-seemann in #4388
- http3: introduce a way for the server to query the client's SETTINGS by @marten-seemann in #4389
- don't set the Allow0RTT flag for the client in the HTTP integration test by @marten-seemann in #4397
- http3: reference the correct RFCs in doc comments by @marten-seemann in #4399
- introduce a ConnectionTracingID type for the ConnectionTracingKey by @marten-seemann in #4400
- http3: pass tracing ID instead of quic.Connection to stream hijackers by @marten-seemann in #4401
- expose the connection tracing ID on the stream context by @marten-seemann in #4414
- http3: expose an OpenStream method on the RoundTripper by @marten-seemann in #4409
- http3: cancel reading on request stream if request processing fails by @marten-seemann in #4417
- http3: remove Settingser, StreamCreator, return Connection from Hijacker by @marten-seemann in #4425
- http3: expose a SingleDestinationRoundTripper by @marten-seemann in #4424
- http3: hide SendDatagram and ReceiveDatagram on the Connection by @marten-seemann in #4427
- fix documentation for CancelWrite after Close on the send stream by @marten-seemann in #4419
- http3: simplify buffering of small responses by @marten-seemann in #4432
- http3: simplify composition of the HTTP stream and request stream by @marten-seemann in #4433
- http3: remove Accept(Uni)Stream methods from the Connection interface by @marten-seemann in #4435
- http3: simplify tracking of content length by @marten-seemann in #4438
- http3: move length limiting to the body by @marten-seemann in #4439
- http3: fix flaky RoundTripper test by @marten-seemann in #4442
- http3: simplify response header writing by @marten-seemann in #4441
- http3: reuse clients on RoundTripOpt context canceled by @GeorgeMac in #4448
- http3: use a log/slog Logger for logging by @marten-seemann in #4449
- http3: remove RoundTripOpt.CheckSettings by @marten-seemann in #4416
- catch spurious UDP sendmsg errors in multiplex integration test by @marten-seemann in #4451
- http3: check server SETTINGS before sending an Extended CONNECT request by @marten-seemann in #4450
- http3: process 1xx status codes by @mchtech in #4437
- fix flaky server accept queue test by @marten-seemann in #4453
- http3: fix race condition when closing the RoundTripper by @marten-seemann in #4458
- Increase send/receive buffers to 7MiB by @bt90 in #4455
- testutils: add a token parameter to ComposeInitialPacket by @marten-seemann in #4391
- flowcontrol: make it possible to call Abandon multiple times by @marten-seemann in #4459
- disable GSO and ECN on kernels older than version 5 by @marten-seemann in #4456
- delay completion of the send stream until the reset error was delivered by @marten-seemann in #4445
- delay completion of the receive stream until the reset error was read by @marten-seemann in #4460
- http3: fix race condition in client unit test by @marten-seemann in #4463
- http3: add support for HTTP Datagrams (RFC 9297) by @marten-seemann in #4452
- README: link to the new documentation site by @marten-seemann in #4464
- http3: rename Settings.EnableDatagram to EnableDatagrams by @marten-seemann in #4466
- http3: implement on the HTTPStreamer on the ResponseWriter, flush header by @marten-seemann in #4469
- include the maximum payload size in the DatagramTooLargeError by @marten-seemann in #4470
- http3: sniff Content-Type when flushing the ResponseWriter by @WeidiDeng in #4412
New Contributors
- @GeorgeMac made their first contribution in #4448
- @mchtech made their first contribution in #4437
Full Changelog: v0.42.0...v0.43.0