Skip to content

Forbid non-ascii field names #786

Open

Description

@wingo

Right now, the field-name production is a string which is specified to be compared case-insensitively with regards to equality. Case-insensitive comparisons are cheap to do for ASCII, but a bit annoying for full unicode. Fortunately (?), field names are always ASCII; values are not but that's OK. So, what about adding a restriction in wasi:http that forbids non-ascii field names?

Activity

  1. wingo commented on Sep 2, 2025

    @wingo
    ContributorAuthor

    Alternately, one could specify field names as list<u8>, and use the byte-lowercase algorithm from fetch: https://infra.spec.whatwg.org/#byte-lowercase

  2. lukewagner commented on Sep 2, 2025

    @lukewagner
    Member

    If we restrict field-name to RFC 9110's field-name as discussed in #791, then I believe we end up with a subset of 7-bit ASCII?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-httpProposal: wasi-http

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions