diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-29 20:25:22 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-29 20:25:22 +0400 |
commit | 9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e (patch) | |
tree | e68d476e7cd564a5462e697a7743da983aec3827 /src/plugins/regexp.c | |
parent | c4621d35aebaf9c6d466bf7a15a9de340b20b0ce (diff) | |
download | rspamd-9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e.tar.gz rspamd-9bd902ee1d0ebb87e789e335dc71bc7fb87e9e8e.zip |
* Add support for empty text or html parts
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r-- | src/plugins/regexp.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 23ec3908c..45f07f9e7 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -335,6 +335,11 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task) cur = g_list_first (task->text_parts); while (cur) { part = (struct mime_text_part *)cur->data; + /* Skip empty parts */ + if (part->is_empty) { + cur = g_list_next (cur); + continue; + } if (part->is_raw) { regexp = re->raw_regexp; } @@ -371,6 +376,11 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task) cur = g_list_first (task->text_parts); while (cur) { part = (struct mime_text_part *)cur->data; + /* Skip empty parts */ + if (part->is_empty) { + cur = g_list_next (cur); + continue; + } if (part->is_raw) { regexp = re->raw_regexp; } |