#2032·spin

rust sdk: Inbound http inconsistency with `wasmtime serve`

Author: lannCreated Nov 2, 2023Updated Jul 6, 2026
Labelssdk

From https://github.com/fermyon/http-auth-middleware/pull/4#issue-1973344440

I believe this is due to the Rust SDK's conditional reconstruction of the full URI:

https://github.com/fermyon/spin/blob/1f7cc3f54a2c8d96a24767bfcaa93ebc3b8982f5/sdk/rust/src/http.rs#L450-L464

If scheme and/or authority is missing, this will return just the path.

While technically a URI must have a scheme and authority, it appears that http::Request::uri (amongst others) produces just a path for inbound requests on many servers.

For compatibility reasons I think we should align with that for inbound wasi-http, though it will be annoying to adjust the conversions.