aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmime/message.c')
-rw-r--r--src/libmime/message.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index e328585cf..0d495fcd8 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -374,6 +374,7 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
}
part->nlines ++;
+ part->empty_lines ++;
c = p + 1;
break;
case seen_lf:
@@ -436,6 +437,7 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
}
part->nlines++;
+ part->empty_lines ++;
c = p + 1;
break;
@@ -459,6 +461,9 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
if (G_UNLIKELY (*p & 0x80)) {
part->non_aciii_chars ++;
}
+ else {
+ part->ascii_chars ++;
+ }
}
break;
case seen_cr:
@@ -477,6 +482,10 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
c ++;
part->spaces ++;
}
+
+ if (*p == '\r' || *p == '\n') {
+ part->empty_lines ++;
+ }
}
state = normal_char;
@@ -508,6 +517,9 @@ rspamd_strip_newlines_parse (const gchar *begin, const gchar *pe,
if (G_UNLIKELY (*p & 0x80)) {
part->non_aciii_chars ++;
}
+ else {
+ part->ascii_chars ++;
+ }
}
c ++;