[net] internal/http3: make QPACK encoder automatically lowercase field names

0 views
Skip to first unread message

Nicholas Husin (Gerrit)

unread,
Apr 29, 2026, 2:14:25 PM (23 hours ago) Apr 29
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, golang...@luci-project-accounts.iam.gserviceaccount.com, Nicholas Husin, Damien Neil, golang-co...@googlegroups.com

Nicholas Husin submitted the change

Unreviewed changes

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

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
Reviewed-by: Nicholas Husin <hu...@google.com>
Reviewed-by: Damien Neil <dn...@google.com>
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
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: net
Gerrit-Branch: master
Gerrit-Change-Id: I80c5b6228b1125fb2249d3ace3030a2b6a6a6964
Gerrit-Change-Number: 771422
Gerrit-PatchSet: 3
Gerrit-Owner: Nicholas Husin <n...@golang.org>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Nicholas Husin <hu...@google.com>
Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages