From ccaf5a7bf975c639db9db74903b4c5c0159b4994 Mon Sep 17 00:00:00 2001 From: Yassir Barchi Date: Wed, 27 Mar 2024 17:33:20 +0100 Subject: [PATCH] fix(headers): avoid double spaces in the headers it fixes https://github.com/lettre/lettre/issues/949 --- src/headers/writer.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/headers/writer.rs b/src/headers/writer.rs index 7d69504..0da376e 100644 --- a/src/headers/writer.rs +++ b/src/headers/writer.rs @@ -55,6 +55,7 @@ impl<'a> EmailWriter<'a> { /// Equivalent to calling `new_line()` and `space()` consecutively. pub(crate) fn new_line_and_space(&mut self) -> fmt::Result { + self.spaces = 0; self.writer.write_str("\r\n ")?; self.line_len = 1; self.optional_breakpoint = false;