Commit Graph

6513 Commits

Author SHA1 Message Date
Marten Seemann
7a10ed602d utils: remove unused methods and constructor from RTTStats (#4672) 2024-09-12 00:55:57 -07:00
Marten Seemann
5247a8ee42 testdata: migrate tests away from Ginkgo (#4670) 2024-09-12 00:42:29 -07:00
Marten Seemann
06cfeb1034 ringbuffer: migrate test away from Ginkgo (#4671) 2024-09-12 00:26:02 -07:00
Marten Seemann
4aee0c0acd quicvarint: migrate tests away from Ginkgo (#4662) 2024-09-11 22:22:17 -07:00
Marten Seemann
196c4bb16b protocol: move away from Ginkgo (#4650) 2024-09-11 21:39:03 -07:00
Marten Seemann
3f3e12bd7c interop: move away from Ginkgo (#4652) 2024-09-11 20:50:14 -07:00
Marten Seemann
889dc81333 qtls: migrate tests away from Ginkgo (#4642)
* qtls: migrate tests away from Ginkgo

* qtls: simplify the quic.EncryptionLevel <-> tls.EncryptionLevel test

* qtls: improve naming of tests
2024-09-11 20:40:26 -07:00
Marten Seemann
a21f6c1c41 qerr: move away from Ginkgo (#4649) 2024-09-11 00:50:06 -07:00
Marten Seemann
72be861aa2 logging: migrate tests away from Ginkgo (#4641) 2024-09-11 00:49:02 -07:00
Marten Seemann
e52027f496 qlog: migrate tests away from Ginkgo (#4640)
* qlog: migrate tests away from Ginkgo

* ci: don't run prealloc linter on test files
2024-09-11 00:28:28 -07:00
Marten Seemann
8fc04bf1e0 fix calculation of idle timeout when the peer sets max_idle_timeout to 0 (#4666) v0.47.0 2024-09-08 02:29:09 -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
Marten Seemann
4f48b2ce25 update qpack to v0.5.1 (#4664)
This release now doesn't reject N=1 values in Literal Field Line with
Name Reference.
2024-09-06 22:08:47 -07:00
Marten Seemann
9478a67635 ci: control concurrency of the interop Docker image builder (#4665) 2024-09-06 22:05:47 -07:00
Kevin McDonald
09c2ac8aab http3: add HTTP Trailer support for servers (#4630) 2024-09-06 21:51:54 -07:00
Marten Seemann
ad8f3c0ff8 fix handling of corrupted coalesced 1-RTT packets (#4663) 2024-09-06 20:43:42 -07:00
Marten Seemann
4be70e0146 protocol: use the packet number decoding / encoding logic from the RFC (#4661) 2024-09-05 09:54:44 -07:00
Marten Seemann
135b8c0e75 interop: fix server setup for the HTTP/0.9 server (#4658) 2024-09-03 02:14:53 -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
1a25053e5e update qpack to v0.5.0 (#4653)
No features were added in v0.5.0, nor were any bugs fixed.
No functional change expected.
2024-08-31 19:58:51 -07:00
Marten Seemann
0b32adc145 interop: simplify API of http09.Server (#4651)
Removes the ListenAndServe method in favor of a ServeListener method.
2024-08-30 22:13:20 -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
Marten Seemann
d067fe4156 bump Go version in go.mod, stop testing on Go 1.21 (#4633)
* bump Go version in go.mod, stop testing on Go 1.21

* ci: update golangci-lint to v1.60.1

* ignore Go 1.23 0-RTT events in exhaustive linter
2024-08-17 00:30:03 -07:00
Marten Seemann
b3811692d9 ci: migrate race detector test to GitHub Actions (#4635)
* ci: migrate race detector test to GitHub Actions

* actually enable the race detector
2024-08-16 23:27:45 -07:00
Marten Seemann
39e2a69a90 remove deprecated quic.VersionNumber and logging.VersionNumber (#4627) 2024-08-12 02:55:21 -07:00
Marten Seemann
0b033db188 fix logging of short header connection IDs (#4626) v0.46.0 2024-08-06 17:28:40 -07:00
Marten Seemann
46fc42d0da only declare send stream completed when RESET_STREAM is acknowledged (#4613) 2024-08-06 16:55:36 -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
af9fa7a555 queue stream-related control frames in the respective stream (#4610)
* use a separate method for queueing control frames from the streams map

* queue stream-related control frames in the respective stream
2024-08-04 15:42:56 -07:00
Marten Seemann
d1f9af4cc6 implement qlog JSONSEQ format, bump qlog version (#4609) 2024-08-03 20:19:51 -07:00
Marten Seemann
f96923b5b2 logging: rename VersionNumber to Version (#4621) 2024-08-03 19:32:11 -07:00
Marten Seemann
931166bb8e remove unneeded cryptoStream interface (#4617) 2024-08-03 17:16:02 -07:00
Marten Seemann
f5ceb73171 handshake: generate CRYPTO_ERRORs for internal_error TLS alerts (#4601)
* handshake: generate CRYPTO_ERRORs for internal_error TLS alerts

* remove stray comment
2024-08-03 17:04:03 -07:00
Marten Seemann
a147bee190 simplify frame queuing logic on 0-RTT rejection (#4607)
Even though we currently don't do so, sending MAX_DATA, MAX_STREAM_DATA
and MAX_STREAMS is allowed in 0-RTT.
2024-08-03 17:00:41 -07:00
Marten Seemann
86d5044eec remove trivial mock implementation of the cryptoStream interface (#4620)
* remove trivial mock implementation of the cryptoStream interface

No functional change expected.

* fix tests
2024-08-03 16:57:03 -07:00
Marten Seemann
e737d4a40e wire: speed up parsing of headers with arbitrary length connection IDs (#4618)
This is significantly faster:
name                                          old time/op    new time/op    delta
ArbitraryHeaderParsing/dest_8/_src_10-16        53.8ns ± 2%    27.4ns ± 2%  -49.01%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16      61.6ns ± 1%    33.3ns ± 3%  -46.00%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16    90.0ns ± 3%    54.8ns ± 5%  -39.09%  (p=0.008 n=5+5)

name                                          old alloc/op   new alloc/op   delta
ArbitraryHeaderParsing/dest_8/_src_10-16         72.0B ± 0%     24.0B ± 0%  -66.67%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16       96.0B ± 0%     48.0B ± 0%  -50.00%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16      320B ± 0%      272B ± 0%  -15.00%  (p=0.008 n=5+5)

name                                          old allocs/op  new allocs/op  delta
ArbitraryHeaderParsing/dest_8/_src_10-16          3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_20_/_src_20-16        3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
ArbitraryHeaderParsing/dest_100_/_src_150-16      3.00 ± 0%      2.00 ± 0%  -33.33%  (p=0.008 n=5+5)
2024-08-03 16:50:42 -07:00
Marten Seemann
87f2894af5 handshake: remove gomock tls.ClientSessionCache implementation (#4619) 2024-08-03 16:43:30 -07:00
Marten Seemann
bb4eb8597c reduce allocations when handling crypto data (#4615) 2024-08-02 21:01:53 -07:00
Marten Seemann
b8ea5c7981 simplify generation of STREAM_DATA_BLOCKED frames (#4608)
The stream always gets blocked at the current write offset. There's no
need to return this offset from the flow controller.
2024-08-01 13:08:09 -07:00
sukun
8d821f4bc8 mark stream completed when CancelWrite is called after receiving STOP_SENDING (#4605)
* garbage collect stream when CancelWrite is called after receiving STOP_SENDING

* review comments

* Hold lock while checking isNewlyCompleted

---------

Co-authored-by: Marco Munizaga <git@marcopolo.io>
2024-08-01 13:07:06 -07:00
Marten Seemann
047cc90f42 ackhandler: reduce allocations for tracking sent packets (#4602) 2024-07-31 16:37:05 -07:00
Marten Seemann
42f04d4e02 refactor frame packing to logic to not access the streams map (#4596)
* avoid accessing the streams map when packing stream data

* avoid accessing the streams map when packing flow control frames

* remove streamGetter interface
2024-07-28 12:32:54 -07:00
Marten Seemann
fc79a77ffe remove unused framer interface (#4599)
No functional change expected.
2024-07-24 16:55:09 -07:00
Marten Seemann
9b70412b0f remove mock TokenStore implementation (#4597)
No functional change expected.
2024-07-24 16:28:01 -07:00
Marten Seemann
8451b0afd7 utils: remove scarcely used time helper functions (#4593) 2024-07-23 14:16:12 -07:00
Marten Seemann
e179048526 wire: simplify packet number parsing, remove utils.ByteOrder interface (#4590) 2024-07-21 14:50:21 -07:00