* 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>
The stream exposes two methods required for doing an HTTP request:
SendRequestHeader and ReadResponse. This can be used by applications
that wish to use the stream for non-HTTP content afterwards. This will
lead to a simplification in the API we need to expose for WebTransport,
and will make it easier to send HTTP Datagrams associated with this
stream.
* Fix protocol
The default value should be "HTTP/3.0".
* Reject normal request with :protocol header
The :protocol pseudo header is only defined for
Extended Connect requests (RFC 9220).
* save one branch check
* Fix review issue