fn redact_headers(line: &str) -> StringExpand description
X-Emby-Token: abc -> X-Emby-Token: [REDACTED]
Scans forward from a cursor rather than recursing on the rewritten string. The obvious recursive version does not terminate: the replacement keeps the header name, so the next call finds the same header again and recurses until the stack is gone. A test provoked exactly that.