From 3b6129720245a23b3a89f5ed8a231de2f410767e Mon Sep 17 00:00:00 2001 From: 2bc4 <119853089+2bc4@users.noreply.github.com> Date: Sat, 30 Dec 2023 15:09:22 +0000 Subject: [PATCH] Filter schannel debug log spam on Windows Issue #25 --- src/http.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/http.rs b/src/http.rs index 022765f..e52b1b6 100644 --- a/src/http.rs +++ b/src/http.rs @@ -154,6 +154,12 @@ impl Handler for RequestHandler { 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)); } }