From 0802e795b38a656e9d4ce087ca7e26e7857ec005 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 14 May 2009 19:52:45 +0400 Subject: [PATCH] * Fix stripping header when matching raw headers --- src/plugins/regexp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) { -- 2.39.5