Commit Graph

385 Commits

Author SHA1 Message Date
Marten Seemann
04eab22893 http3: fix off-by-one error when processing the GOAWAY stream ID (#5145) 2025-05-20 08:43:33 +02:00
Marten Seemann
363e0ccafb http3: implement client-side GOAWAY handling (#5143)
When receiving a GOAWAY frame, the client:
* immediately closes the connection if there are no active requests
* refuses to open streams with stream IDs larger than the stream ID in
the GOAWAY frame
* closes the connection once the stream count drops to zero
2025-05-18 07:33:43 +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
fe02bc2b66 http3: fix flaky TestClientRequestLengthLimit (#5137) 2025-05-11 06:12:26 +02:00
Marten Seemann
50dd857c57 http3: migrate the connection tests away from Ginkgo (#5133) 2025-05-10 16:17:25 +02:00
Marten Seemann
6f8460a821 http3: keep datagram receive loop running on datagram for unknown stream (#5136) 2025-05-10 14:41:47 +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
1725cb0878 http3: close QUIC listeners created by Server on graceful shutdown (#5101) 2025-05-08 08:22:11 +02:00
Marten Seemann
8296ba7d19 http3: don't close QUIC listeners created by the application (#5129) 2025-05-08 07:40:23 +02:00
Marten Seemann
44207b8e72 http3: reset request streams accepted after graceful shutdown (#5116)
* http3: reset request streams accepted after graceful shutdown

The server needs to let the client know that these streams
are not getting processed, using the H3_REQUEST_REJECTED
error code.

* add an integration test for graceful shutdown stream cancellations
2025-05-05 04:28:01 +02:00
Marten Seemann
e1a1251c84 http3: send GOAWAY frame in a new Goroutine (#5114)
Sending might block if the peer didn't grant enough flow
control credit.
2025-05-04 06:21:03 +02:00
Marten Seemann
9d06679273 http3: migrate the server tests away from Ginkgo (#5085)
* http3: migrate the server tests away from Ginkgo

* http3: add a test for server settings
2025-04-30 06:53:37 +02:00
Marten Seemann
41cc01890d http3: return http.ErrServerClosed for ServeQUICConn after Server.Close (#5095) 2025-04-29 12:05:14 +02:00
Marten Seemann
5daf5b6535 http3: remove Alt-Svc entry when Server.Serve returns (#5093) 2025-04-29 05:58:10 +02:00
Marten Seemann
dae68d7ca0 http3: use a slice instead of a map to store active listeners (#5087)
* http3: use a slice instead of a map to store active listeners

This list will be relatively short, therefore it will be
more performant to use a slice instead of a map.

No functional change expected.

* http3: rename listenerInfo to listener
2025-04-29 04:08:41 +02:00
TheoTechnicguy
a9d8093eaf http3: fix documentation for Hijacker and HTTPStreamer (#5089)
* http3: update documentation for `Hijacker`

The documentation for `Hijacker` seems to be legacy from
[v0.43.0](https://github.com/quic-go/quic-go/releases/tag/v0.43.0). This
commit updates the documentation to reflect the current API use.

* http3: update documentation for `HTTPStreamer`

The documentation for `HTTPStreamer` seems to be legacy from
[v0.43.0](https://github.com/quic-go/quic-go/releases/tag/v0.43.0). This
commit updates the documentation to reflect the current API use.
2025-04-29 03:55:43 +02:00
Marten Seemann
f2b1842d52 http3: use httptest.NewRequest (#5086)
No functional change expected.
2025-04-29 03:45:04 +02:00
Marten Seemann
e423d4d184 http3: migrate the frames tests away from Ginkgo (#5067) 2025-04-27 09:44:32 +02:00
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