* Tolerate empty reads in `quicvarint.Read`
Currently, `quicvarint.Read` misinterprets an empty read (`n==0`)
as a single zero byte. While empty reads are "discouraged" in
the `io.Reader` interface, they do sometimes happen, especially
when using `io.Pipe()`.
This change tolerates empty reads, adds a corresponding unit test,
and also includes some additional test coverage related to empty
capsules
* minor test refactor
---------
Co-authored-by: Marten Seemann <martenseemann@gmail.com>
* 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>
The RequestStream is a low-level API that’s used by WebTransport,
CONNECT-UDP and CONNECT-IP. Methods on the RequestStream must be called
in a certain order, and we should detect misuse of the API.
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
* 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
* 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
* 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.