xia-chao removed the review request for wasmtime-wasi-reviewers from PR #14988.
xia-chao opened PR #14988 from xia-chao:serve-duplicate-host to bytecodealliance:main:
#14915 made the scheme come from the connection; here authority follows the same rule, rfc 9112 3.2: two Host headers should be 400, for the guest too.
xia-chao requested rvolosatovs for a review on PR #14988.
xia-chao removed the review request for wasmtime-core-reviewers from PR #14988.
xia-chao requested wasmtime-core-reviewers for a review on PR #14988.
xia-chao requested cfallin for a review on PR #14988.
xia-chao requested wasmtime-wasi-reviewers for a review on PR #14988.
xia-chao edited PR #14988:
two host headers currently get one of them picked as the authority and handed to the guest. #14915 fixed the same kind of guessing for scheme, so this rejects the request with a 400 per rfc 9112 3.2 instead.
:repeat: pchickey submitted PR review:
So, the RFC gives a couple of conditions here and we are detecting them piecemeal. To me, this means its time to create a single helper function
get_request_target(&Request) -> Result<Authority>, which has rustdocs saying it enforces the full set of conditions in https://www.rfc-editor.org/info/rfc9112/#section-3.2A server MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message that lacks a Host header field and to any request message that contains more than one Host header field line or a Host header field with an invalid field value.
And some of that can be de-duplicated out of the p3 branch of code into that auxillary function. In the p2 branch it can just
let _ = authority;so it builds without warnings when p3 disabled.
xia-chao updated PR #14988.
Last updated: Oct 31 2026 at 23:03 UTC