Stream: git-wasmtime

Topic: wasmtime / PR #13138 wasmtime-wasi-http: Only inject Host...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2026 at 13:35):

namse opened PR #13138 from namse:p2-host-header-h1-only to bytecodealliance:main:

Currently, outgoing_handler::handle unconditionally appends a Host header to the hyper::Request before calling WasiHttpView::send_request. This is fine for HTTP/1.1, but embedders that override send_request to dispatch over HTTP/2 (e.g. via hyper_util::client::legacy::Client negotiating h2 through ALPN) end up sending both :authority and a host header on the wire. Per RFC 9113 §8.3.1, clients generating HTTP/2 requests directly should use :authority instead of Host, and strict servers such as Google's GFE reject the stream with RST_STREAM PROTOCOL_ERROR when both appear.

This PR moves the Host insertion out of handle and into default_send_request_handler, which is the only code path in this crate that terminates in hyper::client::conn::http1::handshake. HTTP/1 dispatch preserves the existing behavior, while custom send_request implementations no longer have to strip the header themselves.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 19 2026 at 13:35):

namse requested wasmtime-wasi-reviewers for a review on PR #13138.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 20 2026 at 18:22):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 20 2026 at 18:23):

pchickey added PR #13138 wasmtime-wasi-http: Only inject Host header in the default HTTP/1 send_request path to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 20 2026 at 19:00):

pchickey merged PR #13138.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 20 2026 at 19:00):

pchickey removed PR #13138 wasmtime-wasi-http: Only inject Host header in the default HTTP/1 send_request path from the merge queue.


Last updated: May 03 2026 at 22:13 UTC