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:
In the case of
path-with-query, the spec definesnoneas:This suggests that
noneandsome("")denote the same state. However, by writing tests forclient.send, they resolve differently (usingwasmtimev46)sendwithset-path-with-query(none), returnsErr(HTTP-request-URI-invalid)sendwithset-path-with-query(some("")), returns200, sincesome(""), resolves as/Given the definition above, the natural expectation is that
noneis handled the same way as""; however, given the current mismatch in behavior, I think it's worth clarifying in the spec:noneforpath-with-queryand the resolution mechanism.authority: the spec does not define the validity ofpath-with-queryrelative to the presence ofauthority, however, some implementations do (e.g., https://github.com/bytecodealliance/wasmtime/blob/main/crates/wasi-http/src/p3/request.rs#L337)Related:
OPTIONSbytecodealliance/wasmtime#11780