xia-chao requested dicej for a review on PR #14432.
xia-chao requested wasmtime-wasi-reviewers for a review on PR #14432.
xia-chao updated PR #14432.
xia-chao edited PR #14432.
xia-chao edited PR #14432:
wasmtime serveanswers 500 when a request has neither a URI authority nor a
Hostheader. The rejection happens before the guest runs, so the error now
carries the status the client should see, andservereads it back, defaulting
to 500. That gives the 400 RFC 9112 section 3.2 asks for, and it is not
version-specific: an HTTP/1.0 request withoutHostgets the same 400.
wasi:http/serviceis untouched.
xia-chao commented on PR #14432:
Your three steps are merged, but they don't actually solve the problem: the p2 prepare error gets wrapped into a TrapOrPanicError before serve gets it, so ErrorResponse is only logged and we still return a 500.
To get a 400, we should pass this error back through tx just like instantiation errors do. This touches 6 test cases, but leaves service completely unchanged.
xia-chao commented on PR #14432:
Done in fdf05d286b. Passing the error back through tx gives us the 400 now; my earlier comment was describing the code before this fix.
xia-chao edited a comment on PR #14432:
Done in fdf05d286b. Passing the error back through tx gives us the 400 now;
:memo: pchickey submitted PR review:
Thanks very much for the changes. This round of feedback is mostly that Claude is awfully verbose with comments (you pay by the token, after all) and I think that all of the really obvious ones are best deleted.
:speech_balloon: pchickey created PR review comment:
Delete comment
:speech_balloon: pchickey created PR review comment:
Delete comment
:speech_balloon: pchickey created PR review comment:
This comment only needs to be "A response that should be returned to the client when a request cannot be turned into a guest request."
:speech_balloon: pchickey created PR review comment:
Just "- [
ErrorResponse](crate::ErrorResponse) if the request could not be converted into a guest request."
:speech_balloon: pchickey created PR review comment:
Delete second sentence of this comment.
:speech_balloon: pchickey created PR review comment:
use
wasmtime::bail!with this message
:speech_balloon: pchickey created PR review comment:
Delete comment
:speech_balloon: pchickey created PR review comment:
Delete comment
:speech_balloon: pchickey created PR review comment:
Delete comment
xia-chao updated PR #14432.
xia-chao commented on PR #14432:
Done
:thumbs_up: pchickey submitted PR review.
pchickey commented on PR #14432:
Thanks!
pchickey added PR #14432 serve: answer 400, not 500, for a request with no authority or Host header to the merge queue.
:check: pchickey merged PR #14432.
pchickey removed PR #14432 serve: answer 400, not 500, for a request with no authority or Host header from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC