-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outbound HTTP to same app fails #8
Comments
I started digging into this, adding a debug print statement to the
With
I'm guessing something subtle changed with the WASI 0.2.0 upgrade. I'll try to track it down. |
Okay, I figured it out. When the SDK was targeting WASI 0.2.0-rc-2023-10-18, we implicitly relied on https://github.com/fermyon/spin/blob/78f84e7fc8f19c3a516de2395a399332b6889d67/crates/core/src/wasi_2023_10_18.rs#L1893-L1896 to fill in the |
`wasi:http/outgoing-handler` requires a non-None authority for all outgoing requests. In the past, we relied on adapter code in the host to ensure this (https://github.com/fermyon/spin/blob/78f84e7fc8f19c3a516de2395a399332b6889d67/crates/core/src/wasi_2023_10_18.rs#L1893-L1896), but now that we're targeting `wasi:[email protected]` directly that code isn't used, so we need to do it in the SDK instead. Fixes fermyon#8 Signed-off-by: Joel Dice <[email protected]>
`wasi:http/outgoing-handler` requires a non-None authority for all outgoing requests. In the past, we relied on adapter code in the host to ensure this (https://github.com/fermyon/spin/blob/78f84e7fc8f19c3a516de2395a399332b6889d67/crates/core/src/wasi_2023_10_18.rs#L1893-L1896), but now that we're targeting `wasi:[email protected]` directly that code isn't used, so we need to do it in the SDK instead. Fixes fermyon#8 Signed-off-by: Joel Dice <[email protected]>
Run:
and click on the
outbound-http-to-same-app: http://127.0.0.1:3000/outbound-to-hello-component
link. The page returns an error and the following trace at the console:The text was updated successfully, but these errors were encountered: