WebAssembly / WebAssembly/WASI

Consider specifying what should happen when sending a `request` with `path-with-query: none` and `authority` set

Open
#949 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-http
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

In the case of path-with-query, the spec defines none as:

When none, this represents an empty Path and empty Query.

This suggests that none and some("") denote the same state. However, by writing tests for client.send, they resolve differently (using wasmtime v46)

  • send with set-path-with-query(none), returns Err(HTTP-request-URI-invalid)
  • send with set-path-with-query(some("")), returns 200, since some(""), resolves as /

Given the definition above, the natural expectation is that none is handled the same way as ""; however, given the current mismatch in behavior, I think it's worth clarifying in the spec:

Related:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the path-with-query definition and the client.send behavior described in the issue, then compare the Wasmtime implementation at crates/wasi-http/src/p3/request.rs with related issues 780 and 11780. Done means the specification clearly defines none, its resolution with authority, and the expected validity and request behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, wasm
Domain
documentation, networking
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.