Skip to content

Commit

Permalink
Ignore invalid authority
Browse files Browse the repository at this point in the history
  • Loading branch information
bachp committed Mar 24, 2022
1 parent 3383ef7 commit 0a3f73b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1466,13 +1466,8 @@ impl proto::Peer for Peer {
// header
if let Some(authority) = pseudo.authority {
let maybe_authority = uri::Authority::from_maybe_shared(authority.clone().into_inner());
parts.authority = Some(maybe_authority.or_else(|why| {
malformed!(
"malformed headers: malformed authority ({:?}): {}",
authority,
why,
)
})?);
// Ignore authority if it is invalid.
parts.authority = maybe_authority.ok();
}

// A :scheme is required, except CONNECT.
Expand Down

0 comments on commit 0a3f73b

Please sign in to comment.