From: Vsevolod Stakhov Date: Thu, 14 May 2009 15:52:45 +0000 (+0400) Subject: * Fix stripping header when matching raw headers X-Git-Tag: 0.2.7~143 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0802e795b38a656e9d4ce087ca7e26e7857ec005;p=rspamd.git * Fix stripping header when matching raw headers --- diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 8535c94f7..1b109bf55 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -226,6 +226,7 @@ find_raw_header_pos (const char *headers, const char *headerv) /* Find semicolon */ p += headerlen; if (*p == ':') { + while (*p && g_ascii_isspace (*(++p))); return p; } } @@ -352,8 +353,6 @@ process_regexp (struct rspamd_regexp *re, struct worker_task *task) task_cache_add (task, re, 0); return 0; } - /* Skip header name and start matching after regexp */ - headerv += strlen (re->header) + 1; /* Now the main problem is to find position of end of raw header */ c = headerv; while (*c) {