bytecodealliance / bytecodealliance/wasmtime

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

Open
#11,772 2 comments 0 reactions 0 assignees View on GitHub
bug wasi:impl
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

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 https://github.com/WebAssembly/WASI/issues/791, then we define syntactic validity according to [RFC 9110 §9.1](https://www.rfc-editor.org/rfc/rfc9110.html#section-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? :)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.