Skip to content

WASIp3 request#set-method is more restrictive than RFC 9110 #11772

@wingo

Description

@wingo

Apologies for these bugs, but I like for things to be clear :) So the WASI spec says:

    /// Set the Method for the Request. Fails if the string present in a
    /// `method.other` argument is not a syntactically valid method.
    set-method: func(method: method) -> result;

If we take the approach in WebAssembly/wasi-http#178, then we define syntactic validity according to RFC 9110 §9.1:

  method = token
  token          = 1*tchar
  char          = "!" / "#" / "$" / "%" / "&" / "'" / "*"
                 / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
                 / DIGIT / ALPHA
                 ; any VCHAR, except delimiters

OK, weird that "!" can be a method, but OK.

Only, Wasmtime rejects the following method names: #, $, %, &, and '. The others work!

What should change here, if anything? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixingwasi:implIssues pertaining to WASI implementation in Wasmtime

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions