Skip to content

Commit

Permalink
Filter schannel debug log spam on Windows
Browse files Browse the repository at this point in the history
Issue #25
  • Loading branch information
2bc4 committed Dec 30, 2023
1 parent 171cbf2 commit 3b61297
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ impl<T: Write> Handler for RequestHandler<T> {
fn debug(&mut self, kind: InfoType, data: &[u8]) {
if matches!(kind, InfoType::Text) {
let text = String::from_utf8_lossy(data);

#[cfg(target_os = "windows")]
if text.starts_with("schannel: failed to decrypt data") {
return;
}

debug!("{}", text.strip_suffix('\n').unwrap_or(&text));
}
}
Expand Down

0 comments on commit 3b61297

Please sign in to comment.