Skip to content

rust sdk: Inbound http inconsistency with wasmtime serve #2032

Open
@lann

Description

@lann

From fermyon/http-auth-middleware#4 (comment)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    rustPull requests that update Rust codesdk

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions