Change information
Commit message:
internal/http3: make QPACK encoder automatically lowercase field names
In HTTP/3, a request or response containing uppercase characters in
field names MUST be treated as malformed. We should never send malformed
field names. Therefore, let the QPACK encoder automatically lowercase
all field names.
This is technically not within the QPACK specification, and the duty
should be left to the protocol using QPACK (i.e. HTTP/3). However, this
QPACK implementation lives in the http3 package and is only used by
HTTP/3. So, we might as well do this rather than manually lowercasing
all field names in the HTTP/3 layer prior to encoding it using QPACK, or
wrapping the QPACK encoder in an HTTP/3 encoder which requires extra
alloc.
For golang/go#70914
Change-Id: I80c5b6228b1125fb2249d3ace3030a2b6a6a6964
Files:
- M internal/http3/body.go
- M internal/http3/qpack_encode.go
- M internal/http3/qpack_encode_test.go
- M internal/http3/server_test.go
- M internal/http3/transport_test.go
Change size: M
Delta: 5 files changed, 51 insertions(+), 2 deletions(-)
Branch: refs/heads/master