* Remove http3 dependency on quic internal packages
Remove the dependency on internal/protocol from the http3 package. This
makes it possible for a forked http3 to use the mainline quic-go
package.
* Address review comments
* Fix syntax
* Use broader pattern for http3 directory
* Copy internal/testdata
* Replace perspective with bool
* clone the supported version slice
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
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
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.
* 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
* 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>
* 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
* fix(http3): handle streamStateSendAndReceiveClosed in onStreamStateChange
Signed-off-by: George MacRorie <me@georgemac.com>
* refactor(http3): adjust stateTrackingStream to operate over streamClearer and errorSetter
* test(http3): remove duplicate test case
* chore(http3): rename test spies to be mocks
---------
Signed-off-by: George MacRorie <me@georgemac.com>
The stream hijackers only need to be able to associate the stream with
the underlying QUIC connection. They are not supposed to call any
functions on the quic.Connection. As such, the better API is to just
pass them a unique identifier.
The http.Request.Body can be type-asserted to a http3.Settingser. The
Settings method on this interface blocks until the client's SETTINGS
frame has been received.