Skip to content

Commit

Permalink
Consistently indicate malformed in logs (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
howardjohn committed Jan 10, 2023
1 parent 07d20b1 commit 68e4403
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.rs
Expand Up @@ -1478,7 +1478,7 @@ impl proto::Peer for Peer {
// A :scheme is required, except CONNECT.
if let Some(scheme) = pseudo.scheme {
if is_connect && !has_protocol {
malformed!(":scheme in CONNECT");
malformed!("malformed headers: :scheme in CONNECT");
}
let maybe_scheme = scheme.parse();
let scheme = maybe_scheme.or_else(|why| {
Expand All @@ -1501,7 +1501,7 @@ impl proto::Peer for Peer {

if let Some(path) = pseudo.path {
if is_connect && !has_protocol {
malformed!(":path in CONNECT");
malformed!("malformed headers: :path in CONNECT");
}

// This cannot be empty
Expand Down

0 comments on commit 68e4403

Please sign in to comment.