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
Marten Seemann
29550811b4
remove trivial IPv4 helper function ( #4591 )
2024-07-21 14:50:03 -07:00
Marten Seemann
5f8d146836
wire: optimize parsing of long header packets ( #4589 )
2024-07-21 14:22:32 -07:00
Marten Seemann
bc642d872d
simplify handling of CRYPTO frames, remove cryptoDataHandler interface ( #4588 )
2024-07-21 11:59:08 -07:00
Marten Seemann
72092fbc29
move connection logging to a separate file, absorb logutils package ( #4586 )
...
No functional change expected.
2024-07-21 11:31:32 -07:00
Marten Seemann
c40d4ccb7f
ackhandler: optimize received packet tracking ( #4584 )
...
* ackhandler: use slice instead of linked list to track received packets
* ackhandler: add benchmark test for received packet history
* ackhandler: use the slices package for slice manipulations
2024-07-20 08:14:26 -07:00
Marten Seemann
82b275212c
handshake: remove unneeded tokenProtector interface ( #4585 )
2024-07-19 21:45:20 -07:00
Marten Seemann
7825250d3f
ci: use Go 1.23rc2 for unit and integration tests ( #4571 )
...
* ci: use Go 1.23rc1 for unit and integration tests
* handshake: avoid using linkname to access crypto/tls.cipherSuiteTLS13ByID
* ci: use use Go 1.23rc2
2024-07-18 10:20:54 -07:00
Marten Seemann
b52c33939d
introduce a StreamLimitReachedError for Connection.Open{Uni}Stream ( #4579 )
...
Using a concrete type is preferable to relying on interpreting the
return values from net.Error.Timeout and net.Error.Temporary, especially
since the latter has been deprecated since Go 1.18.
2024-06-28 06:58:28 -07:00
Marten Seemann
7379f1fd5e
handshake: ignore unknown QUIC events from crypto/tls ( #4577 )
2024-06-28 06:24:50 -07:00
Marten Seemann
8f1110450b
use a net.ErrClosed when returning Accept from a closed server ( #4569 )
2024-06-24 03:33:34 -07:00
dependabot[bot]
2da1681699
ci: bump docker/build-push-action from 5 to 6 ( #4576 )
...
Bumps [docker/build-push-action](https://github.com/docker/build-push-action ) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases )
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6 )
---
updated-dependencies:
- dependency-name: docker/build-push-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 00:09:49 -07:00
Mathis Engelbart
b4f3839fce
fix stream documentation for StreamError return values ( #4575 )
2024-06-23 19:33:56 -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
Marten Seemann
1cbd54f087
example: remove Dockerfile ( #4568 )
...
This Dockerfile adds very little value.
2024-06-15 22:01:08 -07:00
Marten Seemann
b19f2f9e3a
metrics: use the default metrics tracer in integration tests ( #4562 )
2024-06-10 14:58:47 +08:00
Marten Seemann
8cae5d80ea
metrics: create a new tracer on every call of DefaultConnectionTracer ( #4560 )
2024-06-07 07:20:20 -07:00
Marten Seemann
4d0562d13c
metrics: add an example Grafana dashboard ( #4559 )
...
* metrics: add an example Grafana dashboard
* metrics: rename Handshake Duration to Handshake Latency
Co-authored-by: sukun <sukunrt@gmail.com >
---------
Co-authored-by: sukun <sukunrt@gmail.com >
v0.45.0
2024-06-06 02:13:35 -07:00
Marten Seemann
0c842975f4
fix incorrect statement about Config.DisablePathMTUDiscovery ( #4558 )
2024-06-05 19:23:53 -07:00
Marten Seemann
cc9a5ee744
qlog: rename DefaultTracer to DefaultConnectionTracer ( #4556 )
2024-06-05 03:50:01 -07:00
Marten Seemann
91221b4a05
metrics: simplify constructor for the default connection tracer ( #4555 )
2024-06-05 03:16:18 -07:00
Marten Seemann
44e0147f2e
pass a context to Transport.ConnContext ( #4536 )
...
* pass a context to Transport.ConnContext
This context is cancelled when the QUIC connection is closed, or when
the QUIC handshake fails. This allows the application to easily build
and garbage collect a map of active connections.
* correctly handle fresh contexts returned from ConnContext
2024-06-04 21:37:18 -07:00