From 0ef106e8a3a39c3dbd8e2cc5f24fff7e0e23ac40 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 2 Aug 2016 17:16:28 +0100 Subject: [PATCH] [Fix] Fix last token folding --- src/libutil/str_util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c index fbaa26c0f..f8441dcf1 100644 --- a/src/libutil/str_util.c +++ b/src/libutil/str_util.c @@ -1152,6 +1152,9 @@ rspamd_header_value_fold (const gchar *name, switch (state) { case read_token: if (cur_len > fold_max && !first_token) { + if (g_ascii_isspace (*c)) { + c ++; + } g_string_append_len (res, "\r\n\t", 3); g_string_append_len (res, c, p - c); } -- 2.39.5