Skip to content

Commit 86979b3

Browse files
committed
Do not always require an authority
This fixes connections where no authority is provide, for example when using UNIX domain sockets. Signed-off-by: Sascha Grunert <[email protected]>
1 parent a193237 commit 86979b3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/server.rs

+2-8
Original file line numberDiff line numberDiff line change
@@ -1393,14 +1393,8 @@ impl proto::Peer for Peer {
13931393
// A request translated from HTTP/1 must not include the :authority
13941394
// header
13951395
if let Some(authority) = pseudo.authority {
1396-
let maybe_authority = uri::Authority::from_maybe_shared(authority.clone().into_inner());
1397-
parts.authority = Some(maybe_authority.or_else(|why| {
1398-
malformed!(
1399-
"malformed headers: malformed authority ({:?}): {}",
1400-
authority,
1401-
why,
1402-
)
1403-
})?);
1396+
parts.authority =
1397+
uri::Authority::from_maybe_shared(authority.clone().into_inner()).ok();
14041398
}
14051399

14061400
// A :scheme is required, except CONNECT.

0 commit comments

Comments
 (0)