Skip to content

Specify what happens when IPv6 is unavailable #779

Open

Description

@wingo

Consider the URL with https://[::1]/. The scheme is https, the authority is the IPv6 literal [::1], and the path-and-query is /. Wasmtime currently fails to set [::1] as an authority. I guess this is a lack of IPv6, though cc @lann for input.

Anyway let's consider that it's OK to not support IPv6. When should an error occur?

MHO: when a request is actually handled. This would be consistent with the language in the WIT:

    /// It is possible to construct, or manipulate with the accessor functions
    /// below, a `request` with an invalid combination of `scheme`
    /// and `authority`, or `headers` which are not permitted to be sent.
    /// It is the obligation of the `handler.handle` implementation
    /// to reject invalid constructions of `request`.

Activity

  1. lann commented on Oct 2, 2025

    @lann
    Contributor

    Do you mean that request.set-authority is failing? That would be a straightforward bug since it should only fail "if the string given is not a syntactically valid URI authority."

  2. wingo commented on Oct 2, 2025

    @wingo
    ContributorAuthor

    Correct, request.set_authority(Some(&"[::1]".to_string())) fails.

  3. lann commented on Oct 2, 2025

    @lann
    Contributor

    Looks like a plain old spec violation to me.

  4. pchickey commented on Oct 2, 2025

    @pchickey
    Contributor

    Agreed, thats a bug in wasmtime.

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