Commit Graph

456 Commits

Author SHA1 Message Date
Nuno Diegues
4c96cf75bf make the keep alive interval configurable (#3444)
* Make keep alive configurable

* Fix unit tests
2022-06-09 08:31:37 -07:00
Marten Seemann
3eed9d1104 don't close the stream if it was hijacked 2022-06-09 10:51:23 +02:00
Marten Seemann
6fa7494c2f add a http3.HTTPStreamer, allowing users to take over the HTTP/3 stream 2022-06-09 10:51:23 +02:00
Marten Seemann
53be3ee500 don't send CONNECTION_CLOSE if error occurred before sending anything 2022-05-20 12:27:00 +02:00
Ivan Trubach
0ec8ee3cff do not embed http.Server in http3.Server (#3397)
This change removes the embedded http.Server struct from http3.Server.
It slightly changes some error behavior, in particular, it mandates
TLSConfig for methods that create QUIC listeners.

Before this change, only Addr, TLSConfig, Handler and MaxHeaderBytes
options were used from the http.Server. These are now defined directly
in http3.Server with an improved documentation.
2022-05-20 02:53:23 -07:00
Chao Fei
60bbe92194 remove error return value from ComposeVersionNegotiation (#3410) 2022-05-12 08:03:39 -07:00
Marten Seemann
a6a9b2494b reduce flakiness of deadline integration tests (#3383) 2022-04-25 04:00:33 -07:00
Marten Seemann
6aaa9a817c rename the EarlySession to EarlyConnection 2022-03-27 11:27:25 +01:00
Marten Seemann
fda9f72161 replace usages of session in variable names 2022-03-27 11:27:25 +01:00
Marten Seemann
e71c236232 rename the Session to Connection 2022-03-27 11:27:23 +01:00
Artem Mikheev
b7e93b54c9 Implement http3.Server.ServeListener (#3349)
* feat(http3): implement serving from quic.Listener

ServeListener method added to http3.Server allowing serving from an existing listener
ConfigureTLSConfig function added to http3 which should be used to create listeners meant for serving http3.

* docs(http3): add note about using ConfigureTLSConfig to ServeListener

* fix(http3): stop serving non-created listeners after Server.Close

* refactor(http3): return ErrServerClosed once server closes instead of context.Canceled

* feat(http3): close listeners from ServeListener as well

* fix(http3): fix logger not being setup during ServeListener

* test(http3): add unit tests for serving listeners

* test(http3): add tests for ConfigureTLSConfig

* test(http3): added server hotswapping integration test

* fix: race condition in listener tests
2022-03-21 02:20:29 -07:00
Marten Seemann
2c8b939d4c add an integration tests that cancels streams frequently 2021-10-16 19:24:28 +02:00
Marten Seemann
8ecbb05d44 Merge pull request #3247 from lucas-clemente/drop-go-115
drop support for Go 1.15
2021-08-05 19:50:30 +02:00
Marten Seemann
be68f7fd65 Merge pull request #3241 from lucas-clemente/fix-stream-cancel-read-race
fix race when stream.Read and CancelRead are called concurrently
2021-08-05 16:20:32 +02:00
Marten Seemann
68e468a3bc drop support for Go 1.15 2021-08-05 14:18:56 +02:00
Marten Seemann
19cebde7c7 also count coalesced 0-RTT packets in the integration tests 2021-08-05 12:54:43 +02:00
Marten Seemann
fbc30cd942 fix race when stream.Read and CancelRead are called concurrently 2021-07-29 13:41:40 +02:00
Marten Seemann
9794b6da4c fix flaky 0-RTT integration test 2021-07-06 11:29:47 -07:00
Marten Seemann
dbb517858e fix incorrect usage of errors.Is
errors.Is is supposed to used for equality of errors, not for type
assertions. That's what errors.As is there for.
2021-06-28 15:29:52 -07:00
Marten Seemann
d97f03bc04 Merge pull request #3166 from lucas-clemente/close-reason-logging
use the new error types to log the reason why a connection is closed
2021-05-04 18:34:34 +07:00
Marten Seemann
1613809ba2 use the new error types to log the reason why a connection is closed 2021-05-03 14:00:41 +07:00
Marten Seemann
e8b09bc290 fix race condition in deadline integration test 2021-05-03 13:24:06 +07:00
Marten Seemann
34322f2214 export the IdleTimeoutError and the HandshakeTimeoutError 2021-05-01 09:39:52 +07:00
Marten Seemann
90727cb41a introduce a quic.StreamError type and use it for stream cancelations 2021-05-01 09:39:52 +07:00
Marten Seemann
93cfef57ca expose a StatelessResetError 2021-05-01 09:39:51 +07:00
Marten Seemann
1ce572228b expose a VersionNegoationError 2021-05-01 09:39:24 +07:00
Marten Seemann
42b61729bd expose the TransportError and the ApplicationError 2021-05-01 09:38:49 +07:00
Marten Seemann
f5238bf7b1 move the ApplicationErrorCdoe to the qerr package 2021-05-01 09:38:49 +07:00
Marten Seemann
592fb9cad9 introduce a dedicated qerr.TransportError and qerr.ApplicationError 2021-05-01 09:38:48 +07:00
Marten Seemann
0413afd615 Merge pull request #3153 from lucas-clemente/trace-version-selection
trace and qlog version selection / negotiation
2021-04-28 18:13:18 +07:00
Marten Seemann
e7c4e756ad trace and qlog version selection / negotiation 2021-04-19 11:38:10 +07:00
Marten Seemann
878e0b261a pass a context to logging.Tracer.NewConnectionTracer
This context has the same value attached to it as the context returned
by Session.Context().
In the case of a dialed connection, this context is derived from the
context used for dialing.
2021-04-14 16:59:36 +07:00
Marten Seemann
e3f36af2e2 Merge pull request #3109 from lucas-clemente/version-negotiation-logging
don't pass the QUIC version to the StartedConnection event
2021-04-02 19:29:55 +07:00
Marten Seemann
f8b847f577 Merge pull request #3104 from lucas-clemente/clean-up-testutils
clean up the testutils
2021-04-02 17:35:58 +07:00
Marten Seemann
c30a45ef6f don't pass the QUIC version to the StartedConnection event
The version might change in response to a Version Negotiation packet.
2021-04-02 17:33:49 +07:00
Marten Seemann
ea14ce5724 Merge pull request #3134 from lucas-clemente/trace-acked-packets
make it possible to trace acknowledged packets
2021-04-02 17:33:19 +07:00
Marten Seemann
905a66cc84 use a tracer to make the packetization test more useful 2021-04-02 17:04:01 +07:00
Marten Seemann
875692ea10 add a function to trace acknowledged packets 2021-04-02 11:37:07 +07:00
Marten Seemann
f71997597c use a tracer to determine the idle timeout period in the integration test 2021-03-20 12:17:59 +08:00
Marten Seemann
45a432f100 save sent and received packets in the tracer used in integration tests 2021-03-20 11:57:55 +08:00
Marten Seemann
7d6be20fdc remove unneeded testutils.ComposeAckFrame helper function 2021-03-20 09:55:26 +08:00
Marten Seemann
f25ec1b62c add a 0-RTT test case using non-zero length connection IDs 2021-03-19 18:23:15 +08:00
Marten Seemann
33a47fe661 remove superfluous function parameter in the 0-RTT integration tests 2021-03-19 18:09:36 +08:00
Marten Seemann
3b20133e84 Merge pull request #3096 from lucas-clemente/allow-zero-rtt-on-initial-window-increase
allow 0-RTT when flow control windows are increased
2021-03-19 17:52:52 +08:00
Marten Seemann
d9c16ea5f1 improve the 0-RTT rejection integration test 2021-03-17 19:12:17 +08:00
Marten Seemann
31ac5ca60d allow 0-RTT when the server's connection receive limit is increased 2021-03-17 18:53:54 +08:00
Marten Seemann
6c3876d6b3 allow 0-RTT when the server's stream receive limit is increased 2021-03-17 18:46:11 +08:00
Marten Seemann
e5a83e1409 Merge pull request #3086 from lucas-clemente/accept-0rtt-on-stream-limit-increase
allow 0-RTT resumption if the server's stream limit was increased
2021-03-16 23:15:55 +08:00
Marten Seemann
5208845191 introduce a logging.CloseReason for version negotiation errors 2021-03-15 13:36:45 +08:00
Marten Seemann
3588cddd43 allow 0-RTT resumption if the server's stream limit was increased 2021-03-11 21:37:40 +08:00