Commit Graph

366 Commits

Author SHA1 Message Date
Marten Seemann
d84d985b92 http3: migrate the body tests away from Ginkgo (#5078) 2025-04-26 15:48:34 +02:00
Marten Seemann
7437cff1e0 http3: migrate the datagram tests away from Ginkgo (#5076) 2025-04-24 08:23:56 +02:00
Marten Seemann
d678f9a86c http3: migrate the response writer tests away from Ginkgo (#5075) 2025-04-23 13:52:22 +08:00
Marten Seemann
3d3922da47 http3: migrate the capsule tests away from Ginkgo (#5073) 2025-04-22 14:03:32 +02:00
Marten Seemann
ad0ffcbd37 http3: check response writer for http.ResponseController methods (#5071) 2025-04-22 13:37:26 +02:00
Marten Seemann
89d9984156 http3: simplify request writer by writing to an io.Writer (#5070)
It’s always preferable to use the most minimal interface.
2025-04-22 13:24:46 +02:00
Marten Seemann
f1c7a5df73 http3: migrate the headers tests away from Ginkgo (#5068) 2025-04-22 12:54:31 +02:00
Marten Seemann
4c9f6df723 http3: migrate the request writer tests away from Ginkgo (#5069) 2025-04-22 12:53:48 +02:00
Marten Seemann
b3f55bb7b7 use assert.AnError consistently in tests (#5066)
No functional change expected.
2025-04-21 03:52:08 +02:00
Marten Seemann
3fd4f95a3b http3: simplify ConfigureTLSConfig (#5011)
The previous logic allowed for setting different ALPN
values depending on the QUIC version in use. This was
needed to set the draft ALPN value before publication of
the RFC.
2025-03-30 15:17:39 +02:00
Marten Seemann
1d8f3f281a ci: update golangci-lint to v2 (#5007) 2025-03-30 07:16:14 +02:00
pittgi
3311514d67 http3: reject duplicate pseudo headers (#4993) 2025-03-16 03:52:25 +01:00
Marten Seemann
02e276ed70 http3: minor simplification of panic handling logic (#4942) 2025-01-28 04:27:09 +01:00
Marten Seemann
54b97a5079 http3: fix flaky transport tests (#4900) 2025-01-21 14:05:50 +08:00
Marten Seemann
ceabb6bd9a http3: fix flaky TestTransportConnectionRedial (#4884) 2025-01-18 13:14:44 +08:00
Marten Seemann
0fd2decbd5 http3: rename singleRoundTripper interface to clientConn (#4875)
No functional change expected.
2025-01-16 14:37:00 +08:00
Marten Seemann
c017def433 http3: fix connection re-dialing logic for non-QUIC errors (#4879) 2025-01-16 14:13:46 +08:00
Marten Seemann
259fd92306 http3: migrate the error tests away from Ginkgo (#4876) 2025-01-16 13:20:43 +08:00
Marten Seemann
a2dccf54ca http3: fix errors.Is for the Error (#4877) 2025-01-15 20:28:11 +08:00
Marten Seemann
155f8a3725 http3: migrate the transport tests away from Ginkgo (#4857) 2025-01-15 19:59:58 +08:00
Marten Seemann
19ab2c3985 http3: close http.Request.Body on all non-nil error code paths (#4874) 2025-01-15 14:52:15 +08: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
cc6b7faafb http3: keep QUIC connection after request context expires (#4854) 2025-01-09 18:55:10 +08:00
RPRX
3552381374 http3: allow concurrent calls to Body.Close (#4798) 2024-12-28 10:52:17 +08:00
Marten Seemann
95998056d5 update GoMock to v0.5.0 (#4776) 2024-12-21 10:56:18 +08:00
Marten Seemann
aed4d8df0c ci: disable the unparam linter for tests (#4738) 2024-12-01 12:27:32 +08:00
Marten Seemann
3e0a67b247 ci: update golangci-lint to v1.62.0 (#4725) 2024-11-18 16:01:39 +01:00
WeidiDeng
98de6aebf7 http3: fix graceful server shutdown (#4707)
* close connHandlingDone once only when the server is shutting down

* close underlying listeners during graceful  shutdown when there is no connection

* remove connDoneOnce
2024-10-21 22:35:35 -07:00
Marten Seemann
6af2b1a478 http3: rename Server.CloseGracefully to Shutdown (#4701)
This is more consistent with standard library naming for graceful
shutdown methods for HTTP/1 and HTTP/2.
2024-10-15 02:14:47 -07:00
Marten Seemann
4a9a81ca34 http3: output panic stack trace as a string (#4700)
It currently is logged as a byte slice.
2024-10-15 01:46:21 -07: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
2dc1e355ce http3: remove deprecated ListenAndServe and Server.SetQuicHeader (#4698) 2024-10-14 00:02:57 -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
b4ae847386 http3: export the Capsule-Protocol header value (#4690) 2024-10-13 22:30:30 -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
Marten Seemann
eaa879f32f http3: send GOAWAY when server is shutting down (#4691)
* send goaway when server is shutting down

* http3: track next stream ID instead of last stream ID for GOAWAYs

* refactor the graceful shutdown integration tests

* http3: improve GOAWAY frame parsing tests

* http3: simplify server graceful shutdown logic

* http3: simplify parsing of GOAWAY frames

* http3: clean up initialization of server contexts

* http3: fix race condition in graceful shutdown logic

---------

Co-authored-by: WeidiDeng <weidi_deng@icloud.com>
2024-10-11 21:47:17 -07:00
Marten Seemann
e5693d0ad7 http3: immediately close all connections on Server.Close (#4689)
* http3: immediately close all connections on Server.Close

* http3: document connection closing when using ServeQUICConn
2024-10-09 13:24:13 -07:00
Marten Seemann
b2233591ad http3: fix capsule parsing (#4683)
The current code returns an io.ErrUnexpectedEOF on partial reads of the
capsule content.
2024-10-02 07:12:27 -07:00
Marten Seemann
1ad36eb7b8 http3: avoid re-parsing of the Content-Length header for responses (#4648)
* http3: avoid re-parsing of the Content-Length header for responses

* http3: set http.Response.ContentLength to 0 for certain types of responses
2024-09-08 01:12:33 -07:00
Kevin McDonald
b92bf0c80d http3: initialize trailer map with empty trailer entries when parsing the header (#4656)
* feat: pre-populate trailers on response with empty values

* fix: improve comment/func name
2024-09-06 23:59:07 -07:00
Kevin McDonald
09c2ac8aab http3: add HTTP Trailer support for servers (#4630) 2024-09-06 21:51:54 -07:00
Marten Seemann
26a3525337 http3: reject connection-specific header fields, check value of TE (#4655) 2024-09-01 02:20:35 -07:00
Marten Seemann
7c3544ca34 http3: set ContentLength to -1 if no Content-Length header is set (#4645)
This applies to both the http.Response and the http.Request.
2024-08-30 05:28:06 -07:00
Marten Seemann
229937c503 http3: reject the Transfer-Encoding header field (#4646)
The use of Transfer-Encoding is forbidden in HTTP/3, see section 4.1 of
RFC 9114.
2024-08-28 05:31:58 -07:00
Marten Seemann
920bfb46af http3: reject pseudo header fields in trailers (#4639)
* http3: reject pseudo header fields in trailers

As defined in section 4.3 of RFC 9114.

* http3: improve allocs for trailer map

* http3: rename connection.parseTrailer to decodeTrailers
2024-08-23 03:42:18 -07:00
Kevin McDonald
17fb3b96ba http3: add client-side HTTP Trailer support (#4581)
* http3: add HTTP Trailer support for clients

This change only adds support to read HTTP trailers sent to clients.

* chore: add protection against some out-of-spec behavior + tests

* chore: re-add test accidentally overwtitten

* chore: empty commit to re-trigger ci

* fix: address some review notes (wip)

* fix: simplify code in stream.Read by using a callback from requestStream.ReadResponse

* restructure where trailers are read and parsed

* WIP simplify trailer parsing design

* chore: refactor to use simpler trailer parsing strategy

* make gofumpt happy

* Update http3/headers.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* remove stray TODO

---------

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
2024-08-22 22:25:58 -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
2a082f973a http3: allow re-dialing of connection after a dial error (#4573)
* http3: do not cache dial error

* add an integration test

* http3: add a unit test for dial failures

---------

Co-authored-by: 世界 <i@sekai.icu>
2024-06-22 21:38:49 -07:00
Marten Seemann
10f8bd4e06 http3: fix race condition between Server.Serve and Server.Close (#4572) 2024-06-23 01:13:56 +08:00