dicej opened PR #14445 from dicej:empty-path-with-query to bytecodealliance:main:
The behavior of
http::uri::PathAndQuery::from_str("")changed in v1.4.1 of thehttpcrate, and although Wasmtime itself has not yet upgraded from the older version it currently depends on, embedders may end up with a newer version.Specifically, the old behavior was to implicitly convert the empty string to a slash, whereas the new behavior is to return an error.
According to https://datatracker.ietf.org/doc/html/rfc3986#section-3.3, an empty string should be acceptable, so this commit restores the old behavior by doing the conversion before passing the result to
PathAndQuery::from_str. That ensures consistent behavior regardless of which version of thehttpcrate the embedder ends up depending on.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
dicej requested pchickey for a review on PR #14445.
dicej requested wasmtime-wasi-reviewers for a review on PR #14445.
:cross_mark: dicej closed without merge PR #14445.
Hold on, there might be a better, less lossy way to do this using
http::uri::Builder. Going to close this and experiment a bit more.
Last updated: Oct 11 2026 at 04:10 UTC