From 0c97bd7c4accba534c42e1ddcd647f61f4aaff77 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sun, 3 Aug 2025 19:02:44 +0000 Subject: [PATCH] fix(internal): silence unsolicited response log lines Signed-off-by: Xe Iaso --- docs/docs/CHANGELOG.md | 1 + internal/log.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/docs/CHANGELOG.md b/docs/docs/CHANGELOG.md index a7485c3..a684b5b 100644 --- a/docs/docs/CHANGELOG.md +++ b/docs/docs/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The contact email in the LibreJS header has been changed. - The hard dependency on WebCrypto has been removed, allowing a proof of work challenge to work over plain (unencrypted) HTTP. - The legacy JSON based policy file example has been removed and all documentation for how to write a policy file in JSON has been deleted. JSON based policy files will still work, but YAML is the superior option for Anubis configuration. +- A standard library HTTP server log message about HTTP pipelining not working has been filtered out of Anubis' logs. There is no action that can be taken about it. ### Breaking changes diff --git a/internal/log.go b/internal/log.go index 1f9e0e7..2cc32d0 100644 --- a/internal/log.go +++ b/internal/log.go @@ -50,6 +50,9 @@ func (elf *ErrorLogFilter) Write(p []byte) (n int, err error) { if strings.Contains(logMessage, "context canceled") { return len(p), nil // Suppress the log by doing nothing } + if strings.Contains(logMessage, "Unsolicited response received on idle HTTP channel") { + return len(p), nil + } if elf.Unwrap != nil { return elf.Unwrap.Writer().Write(p) }