Skip to content

Specify that percent-encoded domain names are unsupported #778

Open

Description

@wingo

If I go to %78.com in the browser, that takes me to x.com. Indeed in RFC9110 §3.2.2, percent-encoding is allowed in HTTPS authorities:

      reg-name    = *( unreserved / pct-encoded / sub-delims )

But, let's just save ourselves the trouble and forbid percent-encoding in domain names. FWIW, wasmtime fails if the host part of an authority has a %.

Activity

  1. lann commented on Oct 2, 2025

    @lann
    Contributor

    I agree. Percent encoding in the authority is only useful to encode non-ascii characters to ascii and wasi-http already represents authority as a unicode string.

    Relatedly, I wonder if the spec should say anything about the whole IDNA/punycode/nameprep bag of worms? That could get very messy but there is probably an argument about avoiding canonicalization attacks in middleware, etc...

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