Skip to content

Commit

Permalink
test(http): do not use host header
Browse files Browse the repository at this point in the history
Since bytecodealliance/wasmtime#7905, `host`
header in incoming requests is not available to guests

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
  • Loading branch information
rvolosatovs committed Mar 25, 2024
1 parent 41321ff commit 76dfb77
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions tests/actors/rust/builtins-component-reactor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ impl exports::wasi::http::incoming_handler::Guest for Actor {
vec![content_length_value]
);

let (host_key, host_value) = header_iter.next().expect("`host` header missing");
assert_eq!(host_key, "host");
assert_eq!(headers.get(&String::from("host")), vec![host_value]);

assert_eq!(
header_iter.next(),
Some(("test-header".into(), b"test-value".to_vec()))
Expand Down
9 changes: 0 additions & 9 deletions tests/actors/rust/interfaces-reactor/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,6 @@ fn assert_http_run(
.parse()
.expect("`content-length` value is not a valid usize");

let (host_key, host_value) = header_iter.next().expect("`host` header missing");
assert_eq!(host_key, "host");
assert_eq!(
headers.get(&String::from("host")),
vec![host_value.as_slice()]
);
let host_value = String::from_utf8(host_value).expect("`host` header is not a valid string");

assert_eq!(
header_iter.next(),
Some(("test-header".into(), b"test-value".to_vec()))
Expand Down Expand Up @@ -166,7 +158,6 @@ fn assert_http_run(
};
let _trailers = http::types::IncomingBody::finish(request_body);

assert_eq!(host_value, authority);
assert_eq!(request_authority, authority);

let outgoing_request = http::types::OutgoingRequest::new(http::types::Fields::new());
Expand Down

0 comments on commit 76dfb77

Please sign in to comment.