Skip to content

Commit c389dfb

Browse files
committed
go via string as there are "invisible" ASCII characters in the FQDN
1 parent 2eb48a1 commit c389dfb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routing/ic/handler.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ pub async fn handler(
6363
// Inject Host header into inner HTTP request.
6464
// HTTP2 lacks it, but canisters might expect it to be present.
6565
if parts.headers.get(HOST).is_none() {
66-
if let Ok(v) = HeaderValue::from_bytes(ctx.authority.as_bytes()) {
66+
let host = ctx.authority.to_string();
67+
if let Ok(v) = HeaderValue::from_str(&host) {
6768
parts.headers.insert(HOST, v);
6869
}
6970
}

0 commit comments

Comments
 (0)