From 4409476894ccf1bb17dd79dddec4f6dbe2361563 Mon Sep 17 00:00:00 2001 From: sainimal1ba-hue <230497022+sainimal1ba-hue@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:31:54 +0000 Subject: [PATCH] Specify the RFC 9110 field-name syntax in wasi-http The field-name docs left it unstated what syntax a field name follows. State that RFC 9110 defines it and allows only ASCII characters, and refer to it as the ground truth for what should be accepted as a field name, as asked for in the wasi-http champions triage of #786. --- proposals/http/middleware.md | 4 ++++ proposals/http/service.md | 4 ++++ proposals/http/wit/types.wit | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/proposals/http/middleware.md b/proposals/http/middleware.md index 7014b9c4..041abda9 100644 --- a/proposals/http/middleware.md +++ b/proposals/http/middleware.md @@ -205,6 +205,10 @@ consistent between implementations.

Field names are always strings.

Field names should always be treated as case insensitive by the fields resource for the purposes of equality checking.

+

The field-name syntax is defined by RFC 9110, which allows only ASCII +characters, and is the ground truth for what should be accepted as a +field name: +https://www.rfc-editor.org/rfc/rfc9110#section-5.1

type field-value

field-value

Field values should always be ASCII strings. However, in diff --git a/proposals/http/service.md b/proposals/http/service.md index 4052be1a..09b28d8f 100644 --- a/proposals/http/service.md +++ b/proposals/http/service.md @@ -289,6 +289,10 @@ consistent between implementations.

Field names are always strings.

Field names should always be treated as case insensitive by the fields resource for the purposes of equality checking.

+

The field-name syntax is defined by RFC 9110, which allows only ASCII +characters, and is the ground truth for what should be accepted as a +field name: +https://www.rfc-editor.org/rfc/rfc9110#section-5.1

type field-value

field-value

Field values should always be ASCII strings. However, in diff --git a/proposals/http/wit/types.wit b/proposals/http/wit/types.wit index a1f6094c..7e33c417 100644 --- a/proposals/http/wit/types.wit +++ b/proposals/http/wit/types.wit @@ -156,6 +156,11 @@ interface types { /// /// Field names should always be treated as case insensitive by the `fields` /// resource for the purposes of equality checking. + /// + /// The `field-name` syntax is defined by RFC 9110, which allows only ASCII + /// characters, and is the ground truth for what should be accepted as a + /// field name: + /// @since(version = 0.3.0) type field-name = string;