Skip to content

outbound-http: Remove host header with http2 #3194

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

Merged
merged 1 commit into from
Jul 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion crates/factor-outbound-http/src/wasi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,11 @@ async fn send_request_handler(
(sender, worker, is_http2)
};

if !is_http2 {
if is_http2 {
// Some servers (looking at you nginx) don't like a host header even though
// http/2 allows it: https://github.com/hyperium/hyper/issues/3298
request.headers_mut().remove(HOST);
} else {
// at this point, the request contains the scheme and the authority, but
// the http packet should only include those if addressing a proxy, so
// remove them here, since SendRequest::send_request does not do it for us
Expand Down
Loading