From 53b16b1405696d337103e9d9d5f2e6d3b2e2a537 Mon Sep 17 00:00:00 2001 From: Charles Eckman Date: Thu, 4 Jun 2026 19:51:33 -0400 Subject: [PATCH] Allow re-casing when serializing for transmission HPACK (RFC 7541) provides a mechanism for compressing HTTP headers; it is used in HTTP/2 and HTTP/3. One of the ways it accomlishes compression is via a static table of common values, listed in Appendix A. Of note, all of the field names in this table are provided in lower case. The restriction of preserving field name case when serializing for transmission implies that an implementation of wasi-http may not always be able to use the most efficient encoding of the field name (from the static table), even when the semantics are the same. This commit relaxes the requirement to preserve case _when serializing for transmission_. This allows an implementation to use the most efficient encoding available when the result is semantically equivalent, e.g. to use HPACK ignoring case differences. --- proposals/http/wit-0.3.0-draft/types.wit | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proposals/http/wit-0.3.0-draft/types.wit b/proposals/http/wit-0.3.0-draft/types.wit index f6d9dd99..e57a137c 100644 --- a/proposals/http/wit-0.3.0-draft/types.wit +++ b/proposals/http/wit-0.3.0-draft/types.wit @@ -178,8 +178,9 @@ interface types { /// /// A `fields` resource should store `field-name`s and `field-value`s in their /// original casing used to construct or mutate the `fields` resource. The `fields` - /// resource should use that original casing when serializing the fields for - /// transport or when returning them from a method. + /// resource should use that original casing when returning them from a method. + /// The `fields` resource may use a different casing when serializing the value + /// for transmission. /// /// Implementations may impose limits on individual field values and on total /// aggregate field section size. Operations that would exceed these limits