124 Commits

Author SHA1 Message Date
gr1ffon
4ba42a8456 replace repo 2025-11-14 04:04:40 +03:00
gr1ffon
7b3ed68ceb make some fields public 2025-11-14 03:40:56 +03:00
Marten Seemann
ce12204bc3 http3: qlog sent and received SETTINGS frames (#5379)
* http3: implement qlog serialization for SETTINGS frames

* http3: qlog sent and received SETTINGS frames
2025-10-12 07:16:37 +02:00
Marten Seemann
cd4b1307db http3: move qlogging of frames into the frame parser (#5378) 2025-10-12 06:40:24 +02:00
Robin Thellend
0a9c6ea4c8 http3: remove dependency on quic internal packages (#5256)
* Remove http3 dependency on quic internal packages

Remove the dependency on internal/protocol from the http3 package. This
makes it possible for a forked http3 to use the mainline quic-go
package.

* Address review comments

* Fix syntax

* Use broader pattern for http3 directory

* Copy internal/testdata

* Replace perspective with bool

* clone the supported version slice

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2025-07-07 13:41:23 +02:00
Marten Seemann
b9d934ff8b http3: tighten checks for incorrect use of RequestStream (#5231)
The RequestStream is a low-level API that’s used by WebTransport,
CONNECT-UDP and CONNECT-IP. Methods on the RequestStream must be called
in a certain order, and we should detect misuse of the API.
2025-06-20 09:55:11 +02:00
Marten Seemann
f16ffc6d16 http3: add ClientConn.Context, CloseWithError and Conn (#5219) 2025-06-17 18:29:27 +02:00
Marten Seemann
39f6e120c0 http3: remove deprecated SingleDestinationRoundTripper type (#5217) 2025-06-09 13:46:53 +02:00
Marten Seemann
6c82ac07cf http3: convert Connection interface to Conn struct (#5204) 2025-06-09 12:16:07 +02:00
Marten Seemann
5f3d617dec convert Connection interface to Conn struct (#5195) 2025-06-09 11:51:46 +02:00
Marten Seemann
9580396fa1 http3: simplify connection closing in the frame parser (#5196)
No functional change expected.
2025-06-07 07:21:53 +02:00
Marten Seemann
1169d97e81 convert ReceiveStream interface to a struct (#5173) 2025-06-01 06:08:18 +02:00
Marten Seemann
eb656df2fe convert Stream interface to a struct (#5149) 2025-06-01 05:40:05 +02:00
Marten Seemann
0b834e6f46 http3: convert Stream from an interface to a struct (#5154) 2025-05-29 05:41:40 +02:00
Marten Seemann
2675d0845f http3: convert RequestStream from an interface to a struct (#5153) 2025-05-29 05:08:39 +02:00
Marten Seemann
06e8ee1bcf http3: reset stream if the server sends too many 1xx responses (#5144) 2025-05-17 06:18:18 +02:00
Marten Seemann
77c401dcbb http3: only retry requests for which it is safe to do so (#5141)
* add an integration test for HTTP/3 redialing logic

* http3: only retry requests for which it is safe to do so
2025-05-16 05:22:13 +02:00
Marten Seemann
3f97a011a7 http3: migrate the client tests away from Ginkgo (#5096)
* http3: migrate the client tests away from Ginkgo

* http3: add a client settings test
2025-05-10 05:24:21 +02:00
Marten Seemann
1d8f3f281a ci: update golangci-lint to v2 (#5007) 2025-03-30 07:16:14 +02:00
Roccoon
96ce54e83f http3: add client trace support (#4749)
Since the QUIC connection establishment process includes TLS handshake logic,
Connect and TLS handshake are called in the following order:

ConnectStart -> TLSHandshakeStart -> TLSHandshakeDone -> ConnectDone.

Notice: Wait100Continue not implemented as quic-go doesn't support handling
Expect: 100-continue.
2025-01-14 12:50:16 +08:00
Marten Seemann
588b93c817 http3: add (deprecated) type aliases for RoundTripper and SingleDestinationRoundTripper (#4699)
This will make transitioning to the new types easier.
2024-10-14 00:15:46 -07:00
Marten Seemann
29f903f486 http3: improve documentation for Transport and ClientConn (#4696) 2024-10-13 23:28:23 -07:00
Marten Seemann
0a6e362879 http3: don't expose ClientConn.HandleUnidirectionalStreams (#4695) 2024-10-13 22:45:49 -07:00
Marten Seemann
1db805ce4f http3: improve the client API (#4693)
* http3: rename RoundTripper to Transport

* http3: rename SingleDestinationRoundTripper to ClientConn

* http3: construct the ClientConn via Transport.NewClientConn
2024-10-13 22:17:50 -07:00
Olivier Poitrey
7c471aac74 http3: implement server idle timeout support (#4587)
* http3: implement server idle timeout support

This update introduces the ability for an HTTP/3 server to enforce an idle
timeout on connections. This timeout will trigger when no new requests are
received on a connection, irrespective of any PING frames received at the
QUIC level.

* fix deadlock when http3 idle timeout is not enabled

* fix typo

* Switch to a more efficient implementation

* Avoid a goroutine
* Avoid constent re-adjusting of a timer
* Works with hijacked streams

* Generalize the idle timeout description

* Add an integration test for http server idle timeout

* Attempt to fix other tests impacted by the new idle timeout test
2024-08-04 15:53:33 -07:00
Marten Seemann
5446b5f912 http3: use the connection, not the stream context, on the server side (#4510) 2024-06-03 10:23:35 +08:00
Marten Seemann
a3d36f1cbb http3: reject reserved frame types (#4467) 2024-05-04 15:23:40 -07:00
Marten Seemann
2a37c53143 http3: add support for HTTP Datagrams (RFC 9297) (#4452)
* http3: add support for HTTP Datagrams (RFC 9297)

* README: reference HTTP Datagrams (RFC 9297)
2024-04-26 11:21:04 -07:00
mchtech
86b53a2516 http3: process 1xx status codes (#4437)
* process http 1xx status code

Signed-off-by: mchtech <michu_an@126.com>

* add integration tests

Signed-off-by: mchtech <michu_an@126.com>

* fix tests

---------

Signed-off-by: mchtech <michu_an@126.com>
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2024-04-21 02:56:45 -07:00
Marten Seemann
3e7ba77a77 http3: check server SETTINGS before sending an Extended CONNECT request (#4450) 2024-04-20 06:21:36 -07:00
Marten Seemann
18422ad1c4 http3: remove RoundTripOpt.CheckSettings (#4416)
The settings can be obtained from the SingleDestinationRoundTripper.
2024-04-20 02:42:33 -07:00
Marten Seemann
9bc7bd84cc http3: use a log/slog.Logger for logging (#4449) 2024-04-20 01:59:58 -07:00
Marten Seemann
25cd4b5d24 http3: simplify composition of the HTTP stream and request stream (#4433) 2024-04-13 17:18:51 -07:00
Marten Seemann
da410a7b59 http3: expose a SingleDestinationRoundTripper (#4424) 2024-04-11 09:55:05 -07:00
Marten Seemann
eb310a6db8 http3: expose an OpenStream method on the RoundTripper (#4409)
The stream exposes two methods required for doing an HTTP request:
SendRequestHeader and ReadResponse. This can be used by applications
that wish to use the stream for non-HTTP content afterwards. This will
lead to a simplification in the API we need to expose for WebTransport,
and will make it easier to send HTTP Datagrams associated with this
stream.
2024-04-09 13:14:14 -07:00
Marten Seemann
183d42a729 http3: pass tracing ID instead of quic.Connection to stream hijackers (#4401)
The stream hijackers only need to be able to associate the stream with
the underlying QUIC connection. They are not supposed to call any
functions on the quic.Connection. As such, the better API is to just
pass them a unique identifier.
2024-04-01 21:23:40 -07:00
Marten Seemann
268208fbef http3: refactor the client's and server's unidirectional stream handling (#4387)
The logic is almost identical, so it makes sense to refactor it into
a shared implementation.
2024-03-24 13:52:44 -07:00
Marten Seemann
684b80a23f http3: don't modify any fields of the http.Request when doing 0-RTT (#4379) 2024-03-23 13:58:41 -07:00
Marten Seemann
603e07779a http3: make it possible to send HEAD requests in 0-RTT (#4378) 2024-03-23 08:24:09 +10:00
Marten Seemann
497d3f58a5 http3: add a RoundTripOpt to check the server's SETTINGS frame (#4355)
For some requests, the client is required to check the server's HTTP/3
SETTINGS. For example, a client is only allowed to send HTTP/3 datagrams
if the server explicitly enabled support.

SETTINGS are sent asynchronously on a control stream (usually the first
unidirectional stream). This means that the SETTINGS might not be
available at the beginning of the connection. This is not expected to be
the common case, since the server can send the SETTINGS in 0.5-RTT data,
but we have to be able to deal with arbitrary delays.

For WebTransport, there are even more SETTINGS values that the client
needs to check. By making CheckSettings a callback on the RoundTripOpt,
this entire validation logic can live at the WebTransport layer.
2024-03-12 01:03:00 -07:00
Marten Seemann
c5f7096f00 http3: reject duplicate control streams opened by the server (#4342) 2024-03-02 23:28:24 -08:00
Marten Seemann
0405634108 http3: don't automatically set RoundTripper.QuicConfig.EnableDatagrams (#4340)
If the user provides a quic.Config, we shouldn't modify it. Instead, we
should return an error if the user enables HTTP Datagrams but fails to
enable datagrams on the QUIC layer.
2024-03-02 22:39:21 -08:00
Marten Seemann
fbaa941ea1 protocol: rename VersionNumber to Version (#4295) 2024-01-31 21:57:33 -08:00
Marten Seemann
2243fdefbf http3: return the context cancellation error from RoundTrip (#4203) 2023-12-20 20:16:30 -08:00
Marten Seemann
d8cc4cb3ef http3: introduce an HTTP/3 error type (#4039)
* http3: introduce an HTTP/3 error type

* http3: use a pointer receiver for the Error
2023-09-16 04:57:50 -07:00
roc
32f8b20ae5 http3: fix check for content length of the response (#3998)
* fix: check response content-length other than request content-length

* Update http3/client.go

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2023-07-28 21:18:26 -07:00
Marten Seemann
5a22ac8970 http3: enforce that DATA frames don't exceed Content-Length (#3980) 2023-07-20 09:47:01 -07:00
Marten Seemann
bb296b8c17 http3: unify handling of request and response headers (#3969) 2023-07-18 21:39:05 -07:00
Marten Seemann
3dea8f8a9b http3: don't send more than http.Request.ContentLength bytes (#3960) 2023-07-16 19:16:52 -07:00
Marten Seemann
3d89e545d3 use the new crypto/tls QUIC Transport (#3860) 2023-07-01 11:15:00 -07:00